Optimal Robust Pulse Design for Magnetic Resonance