The item on Sunday showed an enthusiastic crowd of Iranians saluting the aging Ayatollah on the occasion of the eighth anniversary of the revolution that brought him to power. From their extended hands they seemed to hurl brassieres and panties into his hands.

Friedhelm Ost, the Government spokesman, said today that Bonn regretted the incident. ''We hope we can smooth matters out somewhat by explaining that West Germany has free television, press and radio over which the state has no control,'' Mr. Ost said at a news conference, The white-haired Mr. Carrell personally telephoned Iran's Ambassador, Mohammed Djavad Salari, to apologize. ''If my gag about Ayatollah Khomeini has created anger in Iran,'' Mr. Carrell said later, ''I regret it very much and wish to be pardoned by the Iranian people.''

Mr. Carrell was quoted by the mass-circulation tabloid Bild on Tuesday as having said, ''The Iranians should be devoting their attentions to the war with Iraq.'' Station Apologizes

Today a further apology was proffered by Friedrich Nowottny, the director of the Westdeutscher Rundfunk, which put on the show. He said he regretted that ''a political-satricial attempt had been put in a religious context.''

''No one wanted to offend the feelings of believers,'' he said.

Iran's Prime Minister, Mir Hussein Moussavi, was quoted today as having called the satire a ''hostile act'' and he hinted at retaliation against West Germany's lucrative trade with his country.