The period of fiber Bragg gratings is adapted by shaping the wavefronts of ultrashort laser pulses applied in a phase mask inscription technique. A specially designed deformable mirror, based on a dielectric substrate to withstand high peak powers, is utilized to deform the wavefront. A shift of about 11 nm is demonstrated for a Bragg wavelength around 1550 nm.