D-LGP: Dynamic Logic-Geometric Program for Combined Task and Motion Planning