  Recently it was shown that there is a unique Z_4^R symmetry for the MSSM
which allows the Yukawa couplings and dimension five neutrino mass operator,
forbids the mu term and commutes with SO(10). This Z_4^R symmetry contains
matter parity as a subgroup and forbids dimension four and five proton decay
operators. We show how to construct string vacua with discrete R symmetries in
general and this symmetry in particular, and present an explicit example which
exhibits the exact MSSM spectrum, the Z_4^R symmetry as well as other desired
features such as gauge-top unification. We introduce the Hilbert basis method
for determining all D-flat configurations and efficient algorithms for
identifying field configurations with a desired residual symmetry. These
methods are used in an explicit example, in which we describe in detail how to
construct a supersymmetric vacuum configuration with the phenomenologically
attractive Z_4^R symmetry. At the perturbative level, this is a supersymmetric
Minkowski vacuum in which almost all singlet fields (moduli) are fixed.
