Optical fiber dispersion measurements based on spectral shaping and frequency-to-time mapping