In the present article, we derive optimal spatially varying control fields, which maximize the four-wave mixing efficiency in a four-subband semiconductor asymmetric double quantum well, following analogous works in atomic systems. The control fields coherently prepare the medium, where a weak probe pulse is propagated and eventually converted to a signal pulse at the output. The optimal fields, which maximize the conversion efficiency for a given propagation length, are obtained by applying optimal control theory to a simplified form of propagation equations but are tested with numerical simulations using the full set of Maxwell–Schrödinger equations, which accurately describe the propagation of light pulses in the medium. For short propagation distances, the proposed optimal scheme outperforms a simpler spatially changing control protocol that we recently studied, while for larger distances, the efficiency of both protocols approaches unity. The present work is expected to find application in frequency conversion between light beams, conversion between light beams carrying orbital angular momentum, and nonlinear optical amplification.