Rising majestically in smog-shrouded downtown Tehran, with its spectacular view of 19,000-foot Mount Damavand, the new headquarters of the Rastakhiz Party is a monument to the one-party dream of Shah Mohammed Reza Pahlevi, imperial ruler of Iran.

It is an imposing structure, in size and architecture, and it is topped by a board, overhanging helicopter-landing platform as if to vaunt Iran's breakneck race into the 20th century.

But beset by construction delays and squabbling within the Rastakhiz, the skyscraper is still empty three years after the founding of the party that the shah envisioned as a melting pot for differing views within Iran's society.

About three miles southeast of the Rastakhiz headquarters, at bustling Jaleh Square, the barrel of a squat British-made Chieftain tank pokes menacingly toward onrushing traffic and Iranian soldiers with automatic rifles and bandoliers stand poised, bayonets fixed.

It is here that thousands of angry demonstrators scattered in terror a week ago when the soldiers opened fire with their automatic weapons, leaving the square strewn with possibly hundreds of bodies and bloodstained placards demanding "Death to the shah."

The hauntingly empty Rastakhiz building and the siege-like atmosphere of Jaleh Square provide striking images of a deeply troubled nation and underline recurrent questions about the shah's total control of his country.

After 15 years of unshakable authority, is the shah losing his grip on Iran? By trying to implement his much-heralded liberalization program, is he falling into the trap described by De Toqueville as loosening control and losing control?

While it would be overstating the case to suggest that the shah is on the verge of being run from his throne, it would be understating it to deny that a new situation exists in Iran and that the future of the monarchy is less certain than it once was.

The shah's "White Revolution" - the frenetic oil-fed development boom that thousands of previous apolitical 33 million Shiite Moslems and triggered the unrest here - is foundering. The boom has leveled out, oil production has slipped, the labor force has proved inadequate and rampant inflation has worsened the quality of life for many.

Moreover, Iran has become so rife with land speculation and conspicuous consumption by the favored class that thousands of previous apolitical and poor Iranians became disillusioned and were easily stirred into opposition by the Moselm mullahs, or prayer leaders.

The Rastakhiz, Iran's only legal political party, is in such disarray that the shah himself at a recent press conference voiced disappointment over its development.

Even though the shah has made clear that he is not thinking of returning to a multiparty system, some politicians have announced their intention to desert or ignore the Rastakhiz and form their own splinter parties.

When just a year ago it would have been unthinkable to call publicly for an end of the government, now deputies in Parliament are standing up and boldly blaming Prime Minister Jaafar Sharif-Emani of misfeasance and accusing him of lying about how many antishah demonstrators were killed last Friday.

Presumably under the eyes of agents of SAVAK - the shah's secret police - protesters are passing out leaflets attributed to exiled Moslem leader Ayatollah Ruhollah Khomeini urging futher resistance and suggesting that soldiers turn their guns on their officers.

Under pressure from the increasingly vocal dissidents, the Shah last month inaugurated his "Iranian spring," easing restrictions on freedom of the press and assembly. Predictably, the result was even more challenges to the monarchy and the disastrous clash last Friday, which immediately resulted in martial law for the entire country.

While it is too early to tell whether martial law will spawn new violence and new challenges to the throne, one thing is certain: the opposition by itself cannot take over the government and the only force capable of removing the shah is his highly trained and superbly equipped army.

There are signs of dissension and confusion within the opposition - though exaggerated by the government. But there is no visible disunity in the pampered officer corps of Iran's army, the largest in the Persian Gulf region with more than 300,000 men, plus another 81,000 in the airforce.

The army is everywhere in Iran, only minutes away from any trouble. By all appearances it is under the firm control of its officers, who are unflinchingly loyal to the shah. Their morale presumably is boosted by frequent pay raises and enormous acquisitions of the most sophisticated weaponry.

At a recent reception at the crown palace, this loyalty was vividly displayed as streams of bemedaled generals approached the shah and - their eyes brimming with pride - sharply clicked their heels, bowed low and kissed his hand reverently.

In short, as long as the shah controls the army, the shah controls Iran.

Some members of the opposition are suggesting that any rebellion would come not from the officer crops, but from the disillusioned ranks of enlisted men. There is not much evidence, however, to indicate a real threat at present.

Dissidents report here that in last Friday's clash, a soldier turned his rifle on his commander, shot him and then killed himself. But that unconfirmed report seems to pale against the seemingly flawless discipline displayed by troops deployed in public places here for the last week.

Also, the shah has six months of martial law, which could easily be extended indefinitely, with which to limit his critics' effectiveness. As one western diplomat here said this week, "Is the shah in trouble? You might have been able to say that before martial law, but not now."

The shah also has numerous fallback positions to temporize on the most unpalatable aspects of his authority and, thereby, reduce to some extent the breath of public support for the opposition.

He already has done this by making symbolic changes in his government and by launching a much-publicized anticorruption drive. While the opposition dismisses these moves as finding a fee scapegoats to provide a stop to the restless masse, the action do create the appearance of reform.

By continuing his liberalization program, the shah obviously hopes to shift the thrust of opposition from violent confrontation to the politics.

While he seems not to have found a way yet to broaden the thin borderline between loyal opposition and subversion, observers here do not discount the possibility that the shah can create a situation of delicately harnessed disgruntlement and thereby preserve his regime indefinitely.

The real threats, observers agree, propably lie further down the road, when the shah's 18-year-old, Crown Prince, Reza, takes control of the nation. But for the moment, the shah seems to have been not far off the mark when he said in an interview in June with U.S. News and World Report: "Nobody can overthrow me . . . I have the power."