Origin and reduction of impurities at GaAs epitaxial layer-substrate interfaces