Production of in-fibre gratings using a diffractive optical element