The Iranian ambassador to Paris, a veteran of the leftist middle-class opposition during the reign of the shah, has resigned a year after being named by Ayatollah Ruhollah Khomeini.

Shamseddin Amiralai, 78, apparently resigned over his inability to impose his authority over the staff or to conduct business normally. He is to be replaced by Ali Bani Fatemi, who was originally designated to replace Amiralai's second in command in what appears to be the start of a purge of anyone seen as being in the classical diplomatic mold.

The changes expected at the Paris embassy, one of the Islamic revolutinary government's most important windows to the outside world, are apparently the harbinger of a general radicalization ofIran's foreign missions to be carried out by the new government.

A campaign is being conducted by prominent mullahs in Tehran against the embassies as dens of "corruption andprostitution." It started after Foreign Minister Sadegh Ghotbzadeh's attempt to shift the blame to political infighting among the exiles for the assassination attempt here a week ago against former premier Shahpour Bakhtiar, rather than hailing the captured would-be assassins as heroes of the revolution.

Some sources close to Ghotbzadeh sayhe discussed resigning while here over the weekend. He was changing planes in Paris when he got news of the assassination attempt. Instead of continuing on a scheduled trip to Nicaragua, he returned to Tehran after spending Friday and Saturday consulting with close associates from his exile days here.

In any case, Ghotbzadeh has been saying publicly in Tehran since his return that he will not be foreign minister in the new government. This could have the effect of closing most ofthe few remaining channels of communications between the U.S. and other governments and the Islamic revolutionaries.

Ambassador Amiralai had not even been going to his office during the two weeks preceding the attempt to kill Bakhtiar, according to sources close to the embassy situation. After nine members of the Association of Iranian Moslem Students in France staged a sit-in at the embassy for seven hours on July 4, Amiralai informed Ghotbzadeh he could only continue as ambassador if Khomeini reconfirmed his confidence in him, the sources said. a

The envoy also had called in the French police to clear the premises of the nonviolent but disruptive invaders. There have been persistent reports that Amiralai had requested French police protection against Islamic revolutionaries. Iranian exile sources insist that the reason he was no longer going to the embassy was because he feared for his personal safety there. No one was sure where he was today, but there were reports that he had left France for an undisclosed country, not Iran.

Not only did Khomeini fail to back his ambassador, but the highest-ranking Iranian religious figure in France, Fakhr Rouhani, denounced him in a statement published in Tehran by the newspaper of the majority Islamic Republican Party. Rouhani said the ambassador had "admitted" to him in a conversation proposing to French President Valery Giscard d'Estaing "that France come to replace the United States in Iran. Does he imagine that the Imam of our Islamic nation would accept that France replace the United States?"

The top aide to a leading Iranian exile told me two weeks before the raid on Bakhtiar's apartment that Amiralai had relayed warnings that a hit squad was gunning for prominent exiles. The source said the ambassador had given notice that he would resign rather than cooperate in killings.