Prime Minister Mehdi Bazargan said today Iran's secretive Revolutionary Council is preparing a limited amnesty for officials and supporters of the deposed shah, except those who committed "unpardonable crimes."

Bazargan said in an interview that it was up to the Council to define such crimes, but that they probably would cover those who ordered or paticipated in "massacres of the people, torture of prisoners, treason, corruption and theft of public property."

The prime minister said the amnesty, subject to approval by Ayatollah Ruhollah Khomeini, would affect people who, for example, held positions in formers governments under Shah Mohammad Reza Pahlavi or belonged to the Rastakhiz political party he created.

Bazargan credited his recent appeal for an end to Iran's "spirit of revenge" with helping pave the way for the amnesty declaration. But he conceded it would be "obviously restricted" and that there is "still more work to do to appease the spirit of hate and popular vengeance" in the country.

As he spoke in an interview at his Tehran office, millions of iranians participated in mourning cermonies called by Khomeini for a Moslem religious leader assassinated Tuesday night.

The body of Ayatollah Morteza Motahari, a leading Revolutionary Council member, was buried in the Shiite Moslem shrine of Masumeh in the holy city of Qom today following a massive funeral procession in Tehran.

Many marchers, who gathered at Tehran University, chanted slogans such as "Death to Communists" in what some observers feel could become a new "spirit of revenge" against the Iranian left, Several mourners interviewed at random blamed Motahari's assassination on left-wingers.

A mysterious group calling itself "Forqan," has claimed repsonsibility for the murder, citing its opposition to a "dictatorship of the Mullahs" but using the language of Islamic extremists.

Bazargan, who had conferred with Motahari at an associate's house immediately before the assassination, said: Unfortunately we didn't take enough precautions. We didn't suspect such a thin would happen.

Bazargan said Forqan was "fairly well known" before the February revolution, but he referred further questions to governments spokesman Abbas Amir-Entezam. The spokesman later refused to discuss the group, saying he personally had received four death threats from Forqan yesterday.

Amir-Entezam has been mentioned as one of several government officals on a rumored "hit list" of Forqan targets. Asked about the government's reaction, he said only: "We're doing something about it."

Anonymous callers to news agencies today said Forqan was out to kill all members of the Revolutionary Council in addition to government officials. The authenticity of the calls could not be ascertained.

Bazargan said the Revolutionary Council will operate until power is transferred to a permanent government following ratification of a new Islamic republican constitution and elections of a national assembly and president. Until then, he said, the Council will carry out the functions of a partiament.

In fact, however, critics have accused the shadowy Council-answerable only to Khomeini-of playing a much greater role than a provisional parliament and of dominating the government.

Calling the Revolutionary Council "an institution which on the whole is legal, essential and fundamental" to the government, Bazargan said it will be replaced by an elected parliament when the permanent government is installed. When this can be expected to happen was not made clear.

Bazargan said the much-criticized committees, Islamic courts and "revolutionary guards" also are "necessary in the present circumstances" while police still are unbale to perform their duties because of a breakdown in their ranks during the revolution.

But Bazargan, the former head of the Iranian Human Rights Committee, dodged a question about his present attitude toward the continuing revolutionary trials, which have sent at least 164 persons before Islamic firing squads in the 81 days since he took office.

Bazargan said the aim of the proposed amnesty, which has been promoted by his Cabinet, is to "reduce as much as possible the number of cases tried by the revolutionary courts," limiting their jurisdiction to the unpardonable offenses to be defined by new regulations.

It would remain to be seen whether the definitions would be any less vague than the fuzzy Koranic charges of "corruption on earth" and "waging war against God" that already have figured in a number of death sentences.

Almost 1,300 political prisoners are awaiting trial in Tehran's main Qasr Prison, although it is unclear how many would be covered by the proposed amnesty.

Despite the myriad problems that threaten the government - regional autonomy demands, unemployment, terrorist assassinations and the looming possibility of clashes between Islamic fundamentalists and Iranian leftists-Bazargan seemed composed and self-assured.

Asked whether he would be a candidate for the first president of the Islamtic republic, the 71-year-old prime minister chuckled and said, "That depends. That's for the future. I'm not saying either yest or no."

In today's mourning ceremonies in Tehran, thousands of Khomeini followers shouted virulent anti-communist slogans, raising fears among some leftists that a crackdown may be in the offing.

Hassan Chesavari, a high school teacher, said the thought Communists were responsible for Motahari's assassination and said Moslems would "show their anger" if such acts continued. Concerning an eventual clash between Moslems and Communists, he said, "We are awaiting orders from Ayatollah Khomeini. If he gives the order we will put them in their proper place."

Mahboubeh Bahmani, a middle-aged housewife wearing a black full-length veil, said, "So far I have given two martyrs to the revolution and I am ready to give my other three children and myself to the cause of Islam-to root out the Communists."

"Deaths to Communists," interjected a bystander. CAPTION: Picture, Thousand of grieving Iranians try to catch a glimpse of Ayatollah Morteza Motahari's coffin as it leaves Tehran University for burial in holy city of Qom. AP