The influence of light stimulation and photogenerated carriers on the process of dopant surface segregation during growth is studied in molecular beam epitaxially grown Si-doped GaAs structures. The magnitude of surface segregation decreases under illumination by above-bandgap photons, wherein splitting of the quasi Fermi levels reduces the band bending at the growth surface and raises the formation energy of compensating defects that can enhance atomic diffusion. We further show that light-stimulated epitaxy can be used as a practical approach to diminish dopant carry-forward in device structures and improve the performance of inverted modulation-doped quantum wells.