The problem of finding the optical beams that generate the sum or difference frequency with the greatest possible efficiency in homogeneous crystals with second order nonlinearity is tackled and solved. The interacting beams are first represented as combinations of Laguerre-Gauss modes, and the values of the expansion coefficients are then numerically calculated to determine the most efficient beam shapes and the phase matching condition, neglecting the power depletion of the two pump beams. Some numerical examples of practical relevance, including second and third harmonic generations, are discussed, and it is shown that the absolute maximum of efficiency is in general only slightly greater than that obtainable with suitably focused Gaussian beams.