Measurement of D*+- production in deep inelastic ep scattering at HERA