Theory of phase conjugation by degenerate four-wave mixing using spatially varying pump beams