Study of group 1B impurities in silicon and gallium arsenide and photoquenching effect of EL2 defect in gallium arsenide