We present lattice results for the vector and scalar form factors of the semileptonic decays D -> pi ell u_ell and D -> K ell u_ell in the physical range of values of squared four momentum transfer q^2, obtained with N_f=2 maximally twisted Wilson fermions simulated at three different lattice spacings (a ~ 0.102 fm, 0.086 fm, 0.068 fm) with pion masses as light as 270 MeV and m_pi L gtrsim 4. The form factors are extracted using a double ratios strategy, which allows a good statistical accuracy and is independent of the vector current renormalization constant. The chiral/continuum extrapolation is performed through a simultaneous fit in the three variables (m_pi, q^2, a) using HMChPT formulae with additional O(a^2) terms that parametrically account for the lattice spacing dependence. Our results are in very good agreement with the experimental data in the full q^2 range for both D -> pi ell u_ell and D -> K ell u_ell. At zero momentum transfer we obtain f^{D->pi}(0) = 0.65(6)_{stat}(6)_{syst} and f^{D->K}(0) = 0.76(5)_{stat}(5)_{syst}, where the systematic error does not include the effects of quenching the strange and the charm quarks. Our findings are in good agreement with recent lattice calculations at N_f = 2+1.