Measurement of prompt D-meson production in p-Pb collisions at √s(NN) =5.02TeV