Since the invention of femtosecond pulsed lasers, the field of ultrafast optical science and technology has seen significant progress in the generation and characterization of ultrashort optical pulses. Complimentary to development in generation and characterization techniques, arbitrary temporal shaping of optical pulses has become an integral part of the field. Fourier-transform pulse shaping is the most widely adopted approach that entails parallel modulation of spatially separated frequency components to achieve the desired pulse shape. Recently, dielectric metasurfaces have emerged as a powerful technology for arbitrary control over the amplitude, phase, or polarization of light in a single, compact optical element. Here, we experimentally demonstrate shaping of sub-10 fsec ultrafast optical pulses using a centimeter-scale silicon metasurface acting as both amplitude and phase modulation mask. The deep-subwavelength silicon nanostructures, positioned with nanometer precision, are individual optimized to provide accurate amplitude and phase modulations to each frequency component. Masks of this type offer a lower cost, larger size, higher resolution, high diffraction efficiency, high damage threshold method for controlling ultrafast pulses. The high precision with which metasurfaces can control polarization, amplitude, and phase point toward new, previously unrealizable applications in optical pulse shaping.