The paper describes a procedure for optimizing the conventional diesel fuel injection system by employing an approximation method of mathematical programming. The shape of the cam profile is represented by a Bézier curve and some of the coordinates of the control points are adopted as design variables. Other design variables concern the pump plunger prelift, the geometrical end of delivery and the length of high pressure tube. The objective function is build upon a target shape of the injection rate while the imposed constraints are related to the pump plunger acceleration, the local radius of the cam profile, the residual pressure, the vapour volume, the pressure squareness and to the design variables. The theory is illustrated with several numerical examples.