It was the first confirmation that Khamenei, who holds final say on all state matters in Iran, is in favor of the talks.
His comments came hours after President Bush spoke in favor of such a meeting, saying American officials would show Iran "what's right or wrong in their activities inside of Iraq."
Khamenei said that "if the Iranian officials can make the U.S. understand some issues about Iraq, there is no problem with the negotiations."
"But if the talks mean opening a venue for bullying and imposition by the deceitful party (the Americans), then it will be forbidden," he said in a speech in the northeastern city of Mashhad, aired on state television.
Both the United States and Iran have said the talks will focus solely on stabilizing Iraq and not deal with the heated issue of Iran's nuclear program. No time or place has yet been set for talks, though the U.S. ambassador to Iraq, Zalmay Khalilzad, who is to head the U.S. side, has proposed holding them in Baghdad.
Last week, a top Iranian official — Ali Larijani, the secretary of the Supreme National Security Council — announced that Tehran was willing to enter talks with the United States. Khamenei voiced his approval Tuesday after some hard-liners in Iran's clerical government came out against any contacts with the United States.
Iran has considerable influence with Shiite political parties who dominate Iraq's parliament, and U.S. Secretary of State Condoleezza Rice has said U.S.-Iranian talks on Iraq could be "useful."
Bush on Tuesday told reporters that he had instructed Khalilzad to make Iran understand that "attempts to spread sectarian violence or to maybe move parts that could be used for (improvised explosive devices) is unacceptable to the United States."
The Bush administration has accused Iran's elite Revolutionary Guard of smuggling bomb-making parts across the border into Iraq, though Gen. Peter Pace, chairman of the Joints Chiefs of Staff, acknowledged last week he has no evidence Iran's government is sponsoring such activity. Bomb attacks have mainly been carried out by Sunni insurgents attacking the Shiite-led Iraqi government.
Also in Tuesday's speech, Khamenei dismissed the threat of U.N. Security Council action over Iran's nuclear program, saying Tehran would reject any measures it considers against its interests.