President Trump pressed the Iranian government to reach a deal on its nuclear program as he weighs possible military action against the country.