We present a method for the steady state optimization of nonlinear delay differential equations. The method ensures stability and robustness, where a system is called robust if it remains stable despite uncertain parameters. Essentially, we ensure stability of all steady states of the nonlinear system on the steady state manifold that results from the variation of the uncertain parameters. The uncertain parameters are characterized by finite intervals, which may be interpreted as error bars and therefore are of immediate practical relevance. Stability despite uncertain parameters can be guaranteed by enforcing a lower bound on the distance of the optimal steady state to submanifolds of saddle-node and Hopf bifurcations on the steady state manifold. We derive constraints that ensure this distance. The proposed method differs from previous ones in that stability and robustness are guaranteed with constraints instead of with the cost function. Because the cost function is not required to enforce stability and robustness, it can be used to state economic or similar goals, which is natural in applications. We illustrate the proposed method by optimizing a laser diode. The optimization finds a steady state of maximum intensity while guaranteeing asymptotic or exponential stability despite uncertain model parameters.