Electronic polarization (relaxation) effects in the core level spectra of semiconductors II. Application to Ga3d and Si2p levels