Ayatollah Ruhollah Khomeini today warned the leaders of Arab oil-producing countires to use their oil weapon against the United States or suffer the same fate as deposed Shah Mohammad Reza Pahlavi.

He also publicly called for trials to pass judgment on President Carter and two of his predecessors, Richard M. Nixon and the late Lyndon B. Johnson.

Meanwhile, in apparent reaction to reports from New York that the ousted shah might soon complete medical treatment and leave the United States, the militants holding 50 American hostages at the U.S. Embassy issued a statement warning that "we will put the hostages on trial much sooner than the date we had discussed" if the shah left America for any destination except Iran.

Speaking to European journalists in the Shiite Moslem holy city of Qom, Khomeini warned leaders of Arab oil-producing countries, made nervous by the implications for Saudi Arabia of last week's attack on the Great Mosque in Mecca, that "if they do not use the oil weapon" against the United States, "their people will make them suffer the fate of Mohammad Reza" -- as he calls the shah.

Since Khomeini succeeded in toppling the shah, a favorite Iranian revolutionary propaganda theme -- especially for the nervous Arab world -- has been the power of the people against constituted authority.

Nowhere has this been truer than with regard to the Arabian peninsula and Iraq, areas where several governments rule over restive Shiite Islamic populations who are thought to draw inspiration from Iran, the largest Moslem country with a Shiite majority.

No trial date has ever been made public in the 11 days since the 79-year-old Khomeini first threatened to try the hostages for espionage if the shah were not extradited to Iran.

[News agency reports from Iran quaoted the student militants as saying that treatment of the Americans held in Tehran would worsen if the shah left the United States.]

The State Department revised its figure for the number of hostages from 49 to 50. The new figure, revealed in a U.S. appeal to the International Court of Justice for the release of the hostages, included California businessman Jerry Plotkin, who previously was not known to be a hostage.

[United Press International also quaoted the militants as spurning washington's efforts to bring the 20-day crisis before the World Court. "We do no accet the World Court, just as we rejected the United Nations Security Council," the agency quoted the militants as saying.]

Khomeini repeated tonight that all hostages would be released if the shah were returned to Iran.

Turning again to the United States, the religious leader appeared to suggest a kind of latter-day Nuremberg tribunal to judge the complicity of American presidents with the shah's alleged misdeeds.

"We will ask for the trial of presidents who have their hands in the crimes -- any figure, whether it is Carter, Nixon or Johnson," he said in the interview, which was later televised. "We will ask that they be put on trial."

In his attack, Khomeini said, "Carter is frightened that his crimes and wrongdoings will be revealed and that we will prosecute him and that as a result his chance for the 1980 presidency will be destroyed."

The ayatollah also said, "If you hear Carter has gone to church and prayed for the hostages' release, be sure that his prayer is just like the shah's, who used to pray in the mosque."

Khomeini also bitterly complained that Carter has been pressing many countries to send letters to the Iranian Foreign Ministry to ask for the hostages' release.

The ayatollah again chastized the foreign press and for the first time said, "We have got documents, which prove some journalists were plotting against Iran, and (they) are at the U.S. Embassy and will be revealed later."

The radical students, who seem to have Khomeini's full confidence, issued their warning as several hundred thousand Iranians marched to support him in his showdown with the United States.

Against the background of mixed political and religious fervor on the occasion of Shiite Islam's holiest holidays, Iran's new foreign minister, Sadegh Chotbzadeh, told a French radio reporter he was "not keen" to attend Saturday's scheduled U.S. Security Council emergency session. A decision to pass up the session devoted to the American-Iranian crisis would scarcely come as a surprise.

Khomeini himself dismissed the Security Council as a pro-American forum shortly before firing Abol Hassan Bani-Sadr, whose bid to attend an emergency session yesterday cost him the Foreign Ministry.

Today the march on Tasua -- the first of the two-day holiday mourning the death of the prophet's grandson Hussein, 1,400 years ago -- was billed as the nation's rejection of the United States, much as last year's symbolized rejection of the shah.

Braving rain and the first cold weather of the season, today's marchers followed the now classic route to the monument the shah built to glorify 2,500 years of his nation's history.

Tomorrow, on Ashura, for the anniversay of Hussein's actual death, marchers will converge on the U.S. Embassy, where the hostages have been held since Nov. 4.

Indicative both of the large turnout expected and of the prospects of the hostages' continued detention was the metal fence being welded into place to hold back the crowds from the sidewalk in front of the embassy's main gate.

Khomeini availed himself of the holiday to hail the draft constitution that is to be voted upon in referendum this weekend. He called it "one of the greatest or maybe the greatest result of the Islamic revolution."

Failure to vote for it, he said, would be "wasting the blood of the martyrs" killed in bringing down the shah.

He appealed especially to the Kurd, Baluchi and Turkoman national minorities to vote. They have attempted to boycott the referendum over Khomeini's refusal to accept a federal constitution granting them autonomy.

In an apparent effort to win over a wide spectrum of political parties prepared to boycott the referendum, Khomeini vaguely promised "that any difficulties can be removed in a supplementary part" that could be added to the basic text.

The marchers themselves -- both men, and women clad in black, full-length chadors -- were relatively subdued today.

On Khomeini's orders the men refrained from traditional carrying of knives and violently beating themselves bloody. The order apparently was dictated by a desire not to shock foreign television viewers.

Absen from this year's Tausa march were the middle class Iranians whose participation in 1978 signified their disaffection with the shah and helped seal his doom.

Many middle class Iranians have either left the country or have become too disillusioned with the revolution to take part.