Measurement of D mesons production in deep inelastic scattering at HERA