Measurement of D0, D+, D*+ and Ds+ production in Pb-Pb collisions at √sNN=5.02 TeV