Ayatollah Ruhollah Khomeini warned more clearly than ever before Monday that unless leftist guerrillas stop "plotting against the Islamic revolution" they will be considered guilty of an "uprising" and dealt with accordingly.

Broadcasting nationwide on the "Voice of the Islamic Revolution," the 78-year-old Moslem clergyman did not mention the Marxist guerrillas by name.

But when he castigated foreign-controlled "'anti-rcvolutionary forces wearing different names," his message was clear to Iranian listeners because of the context of his remarks.

While attacking his opponents on the left, Khomeini's government continued to carry out punishments of the military leaders who were a key element of the regime of deposed Shah Mohammad Reza Pahlavi.

The government radio announced earlier today that four more generals had been executed. They included a former commander of the Imperial Guard, a military governor in Qazvin, an infantry commander in Qazvin, and an official of the dreaded secret police SAVAK.

Determined to consolidate the revolution carried out in his name, Khomeini was putting his erstwhile leftist allies on notice he will not tolerate further radicalization.

The hardcore leftist Fedaye guerrillas, said to number about 20,000 and armed with about 10,000 weapons looted from army arsenals last week, are known to feel that their only salvation as a separate organization lies in accelerating the revolution.

Most contention so far has centered on the refusal of any guerrilla organization -- left or right, as well as many everyday citizens -- to comply with government demands to hand in weapons seized in the decisive fighting last week.

Informed sources said Khomeini was worried enough to have consulted army leaders about what to do about the situation.

Some analysts believe the armed forces are so demoralized -- and Khomeini's followers so relatively inexperienced -- that together they might lose if they sought to disarm the leftists by force.

Symptomatic of the malaise in the armed forces were Khomeini's orders for deserters to return to their posts and cooperate with his own militiamen "to protect this city and its strategic points.'

Alluding to last week's attack on the U.S. Embassy and the radio and television center, he said, "These people who are destroying things and behaving and acting against Islam and trying to capture key positions in support of foreign elements should remember their power is not greater than the evil satantic forces of the shah and his supporters."

Those leftist-inspired attacks further humiliated still shaky government authority and prompted Khomeini to declare, "I will not allow anarchy."

He insisted that any group "going by any name" must "work under the flag of Islam" on pain of having its activities "considered an uprising." This was directed as much at lay groups and liberals as at the left-wing extremists.

In recent days, various political groups have asked for official government recognition as part of the heritage of overthrowing the shah and his monarchy.

The Fedaye, in particular, have orchestrated agitation among radical soldiers' committees and leftist oil workers, demanding that the whole armed forces structure be changed and replaced by a "Peoples Army."

Illustrative of Khomeini's inability to impose instant compliance with his once-unquestioned orders was yet another appeal by Gen. Mohammed Vali Gharani, his recently appointed chief of staff, for all troops to report to their barracks.

Although all Iranians were supposed to have resumed work Saturday, the appeal clearly indicated that the earlier orders have gone unheeded by many soldiers. For the first time Gharani set a deadline -- Tuesday -- but did not spell out what would happen to troops who failed to meet it.

Meanwhile, Sadegh Ghotbzadeh, a key Khomeini aide in charge of radio and television, told his charges: "Now we are not the mouthpiece of the government, but will report its news."

That was his way of saying that despite a rising chorus of complaints about censorship -- compared unfavorably with the shah's -- he had no intention of letting liberals and leftists use radio and television for their own purposes.

Ghotbzadeh specifically vetoed his workers' request for quick elections to choose their own executives. Left unsaid was the fear that the left would likely sweep any such elections, which are being agitated for in many offices and factories throughout the country.

In other developments, Yasser Arafat, the visiting chief of the Palestine Liberation Organization, today inaugurated a new office here on the former premises of the Israeli trade mission that had functioned as an embassy.

The last remaining 67 Israelis were ordered expelled last night to mark Arafat's visit, thus ending a generation-long unofficial alliance that sup plied Israel more than half its oil requirements and the shah with precious intelligence about Arab, and especially Palestinian, activities.

In visiting the premises, looted during the recent uprising, Arafat said. "Iranian guerrillas will fight alongside Palestinians in the battle against Israel."

"We freed Iran today and we will do the same thing under the leadership of Ayatollah Khomeini and with the help of Iranian freedom fighters. We will free Palestine."