Optimized pulse source for 40-Gb/s systems based on a gain-switched laser diode in conjunction with a nonlinearly chirped grating