We present a systematic theoretical study of spin-dependent recombination and its effect on optical orientation of photoelectron spins in semiconductors with deep paramagnetic centers. For this aim we generalize the Shockley-Read theory of recombination of electrons and holes through the deep centers with allowance for optically-induced spin polarization of free and bound electrons. Starting from consideration of defects with three charge states we turn to the two-charge-state model possessing nine parameters and show that it is compatible with available experimental data on undoped GaAsN alloys. In the weak- and strong-pumping limits, we derive simple analytic equations which are useful in prediction and interpretation of experimental results. Experimental and theoretical dependences of the spin-dependent recombination ratio and degree of photoluminescence circular polarization on the pumping intensity and the transverse magnetic field are compared and discussed.