Event-Shape Engineering for the D-meson elliptic flow in mid-central Pb-Pb collisions at √sNN=5.02 TeV