Controlling the dynamics of electrons and nuclei in ultrafast strong laser fields