Measurement of prompt D-Meson Production in p-Pb Collisions at sqrt s NN =5.02 TeV