We have applied the Green-function method in the GW approximation to calculate quasiparticle energies for the semiconductors GaP and GaAs. Good agreement between the calculated excitation energies and the experimental results was achieved. We obtained calculated direct band gaps of GaP and GaAs of 2.93 and 1.42 eV, respectively, in comparison with the experimental values of 2.90 and 1.52 eV, respectively. An ab initio pseudopotential method has been used to generate basis wave functions and charge densities for calculating the dielectric matrix elements and self-enegies. To evaluate the dynamical effects of the screened interaction, the generalized-plasma-pole model has been utilized to extend the dielectric matrix elements from static results to finite frequencies. We presen the calculated quasiparticle energies at various high-symmetry points of the Brillouin zone and compare them with the experimental results and other calculations.