Feedforward control from measurable disturbances can significantly improve the performance in control loops. However, tuning rules for such controllers are scarce. In this paper design rules for how to choose optimal low-order feedforward controller parameter are presented. The parameters are chosen so that the integrated squared error, when the system is subject to a step disturbance, is minimized. The approach utilizes a controller structure that decouples the feedforward and the feedback controller. The optimal controller can suffer from undesirable high-frequency noise characteristics and tuning methods for how to filter the control signal are also provided. For scenarios where perfect disturbance attenuation in theory is achievable but where noise-filtering is needed, the concept of precompensation is introduced as a way to shift the controller time-delay to compensate for the low-pass filtering.