We describe a formal approach to the wavelength stabilization of a synchronously pumped ultrafast optical parametric oscillator using proportional-integral feedback control. Closed-loop wavelength stabilization was implemented by using a position-sensitive detector as a sensor and a piezoelectric transducer to modify the cavity length of the oscillator. By characterizing the frequency response of the loop components, we constructed a predictive model of the controller which showed formally that a proportional-only feedback was insufficient to eliminate the steady state error, consistent with experimental observations. The optimal proportional and integral gain coefficients were obtained from a numerical optimization of the controller model that minimized the settling time while also limiting the overshoot to an acceptable value. Results are presented showing effective wavelength and power stabilization to levels limited only by the relative intensity noise of the pump laser. © 2010 American Institute of Physics.