President Trump spoke with President Vladimir V. Putin of Russia amid escalating attacks between Russia and Ukraine, even as their officials have been engaged in direct talks.