Measurement of D-meson production at mid-rapidity in pp collisions at √s = 7 TeV