Iran sent signals that it was open to overtures in a recent letter from U.S. President Barack Obama as talks kicked off here on Sunday, but tensions in both nations’ capitals are complicating attempts to rein in Tehran’s nuclear program as a diplomatic deadline approaches. Iranian officials confirmed that Mr. Obama reached out directly to Supreme Leader Ayatollah Ali Khamenei in a mid-October letter that emphasized shared interests in combating the Islamist militants who have seized territory in Iraq and Syria. But responses from Tehran suggested continued divisions inside Iran’s leadership on how to respond to the U.S. Adding unpredictability are last week’s U.S. midterm elections, in which Republicans took control of the Senate. Lawmakers have said that could clear the way for long-stalled legislation that would crack down on Iran and add to the weight of U.S. sanctions.