Iran flatly rejected President Carter's latest offer on the U.S. hostages tonight, dismissing it as "a fresh design by Carter to fill the ballot boxes."

In its first comment on Carter's offer to unfreeze Iranian assets in the United States and lift its trade embargo in exchange for release of the 52 hostages held by Tehran revolutionaires for almost a year now, the official Radio Tehran called it simple electioneering, and added:

"Of course it is quite obvious to us that all those evil plots to crush Iran Carter could neve tolerate a strong Iran under the banner of Islam."

The apparently categorical Iranian rejection contrasted sharply with continued optimism in Washington that the administration's conciliatory remarks could lead to movement on the long-stalled hostage issue.

Prime Minister Mohammed Ali Rajai of Iran emphasized during his U.N. appearance over the weekend that only the Iranain parliament could decide under what conditions the hostages will be released and that it would consider the issue soon. The parliament was reported to plan a special session Wednesday, but there was no indication whether the hostages would be on the agenda.

Iraq, meanwhile, demonstrated concern over the president's overtures with a warning to Washington against allowing its preoccupation with the hostages to tilt U.S. policy toward Iran in the month-old Persian Gulf war. Iraqi Foreign Minister Saadoun Hammadi, in an interview with a Kuwait newspaper today, said that he had warned Secretary of State Edmund Muskie that the "United States better remain neutral in the gulf conflict."

The United States must stay out of the conflict and refrain from supplying weapons and spare parts to Iran," Hammadi was quoted as saying. If the United States did not, he said, "Iraq will consider America a hostile partly directly involved in the gulf conflict."

Hammadi's warning, raising the tone slightly from earlier such Iraqi statements, seemed to be a reaction to the recent Washington statements softening the U.S. line on Iran, not only by Carter but also by Muskie, who has earned Iraq's ire by stating that Wasington is "opposed to the dismemberment of Iran."

"We believe the cohension of Iran is in the interest of the stability of the region as a whole," Muskie said yesterday. "The integrity of Iran is threatened by Iraq's invasion."

The concern over U.S. neutrality in the war came as Habib Chatti, the secretary general of the 40-nation Islamic Conference, kept alive hopes that Iran might agree to mediation by a committee of Islamic heads of state.

Yesterday, after Chatti met with the Iranian leader, Ayatollah Ruhollah Khomeini, Iran said it would accept an Islamic Conference commission of Moslem heads of state to "investigate the criminal invasion" of Iran by Iraqi. But Tehran radio, which reported Khomeini's acceptance of the commission, restated previous Iranian conditions for any cease-fire that have been considered unacceptable to Iraq, whose troops continued to press their siege of the Iranian port of Khorramshahr and its neighboring oil center of Abadan.

"It is all right for the Islamic leaders come Iran to investigate Saddam's crime," the radio said, referring to the President Saddam Hussein of Iraq. "He should withdraw his troops and take his hands off Iraq and his people would get the freedom to decide their own destiny."

Today Chatti said Iran had not yet turned down his proposal for real mediation of the conflict. Chatti visited Baghdad last week for talks with Hussein who, sources in Baghdad said, had agreed to the mediation effort on condition that Iran also does.

"They are still talking to me and that means there is still a glimmer of hope," Chatti said in Tehran today, noting that his mediation proposal was now before the eight-member Supreme Defense Council that has taken over direct control of the war effort. "I am still waiting for an offical response to my proposal."

Chatti said he hopes that should Iran agree to a mediation commission, an emergency session of the Islamic Conference's foreign ministers would be called to meet either in Islamabad, Pakistan, or the United Nations, to map out mediation strategy.

As the war entered its second month, Iranian defenders continued to hold off attacks by Iraq's superior forced besieging Khorramashahr and Abadan, both of which are surrounded and cut off from reinforcements and resupply.

Tehran radio said Iranian forces, made up of Revolutionary Guards and elite Army units, had fought off Iraqi attacks at the main entrance to Abadan, at the Bahmanshir River bridge, after another day of continuous artillery and mortar pounding. Washington Post correspondent Stuart Auerbach reported from the Iraqi side of the Shatt-al-Arab waterway that black smoke curled into the sky from the two towns as a result of fires set by the four weeks of artillery bombardment.

The Iranian radio also reported a Supreme Defense Council communique which said that Iranian forces who have been resisting Iraqi troops in Khorramshahr were engaged in "fierce hand-to-hand fighting" with the Iraqis around the city's railway station, slaughter house and central Teleghani Square.

The Iranians also claimed to have retaken two small towns, Gilan-e-Gharb and Sar-e-Pol-Zahab, west of the central city of Khermanshah. Iraq had overrun the two towns in the first week of the war.

The Iraqis, meanwhile, reported Iranian air raids on "civilian targets" in the cities of Sulimanieh and Akra in the north and Amrah and the oil terminal center of Al Faw in the south. The Iraqis said their own planes had bombed an oil storage tank farm at Veys, north of the Khuzestan Province capital of Ahwaz, and military installations outside Dezful, the Khuzestan city where President Abol Hassan Bani-Sadr has made his headquarters to inspire the Iranian war effort.