D meson mass and heavy quark potential at finite temperature