The demand by Foreign Minister Dadegh Ghotbzadeh of Iran for a "grand jury" investigation of "crimes" of the shah and the United States back to President Eisenhower is setting the stage for a harder line by Jimmy Carter -- or a tacit admission by him that U.S. hands really are dirty.

Such an admission would be viewed by many presidential aides as intolerable, even if it did ensure freedom for the 50 U.S. hostages. Yet a temptation clearly exists among some other presidential advisers, in and out of the White House, "to be a little demeaning" (in the candid phrase of one) and go partway with Ghotbzadeh to get the hostages home.

The strategy of the Iranian militants to twin shah with the United States and put both on trial before freeing the American prisoners was succinctly outlined by Ghotbzadeh on ABC's "Issues and Answers" Dec. 16. What he wants is "getting to the front the crimes that [the United States] has committed here and the interventions of the American administrations," along with "the crimes of the shah."

The trouble with this is that although some American politicians, led by Sen. Edward Kennedy, have made a conspicuous point of their agreement with half of that charge -- the part about the "crimes" of the shah -- the half about the crimes of the American government, past and present, has few defenders, at least in public.

The temptation for Jimmy Carter is to yield a little here, a little there on these cunning demands in hope of freeing the hostages without having to get nasty. That is the effect of what he did, for example, in hastily packing off the shah to an islet off the coast of Panama. The pressure was a friendly signal to the men running Iran that, deep down, Jimmy Carter agrees that the shah is not a very nice man.

But giving even so small a gesture as this is likely to whet the appetite of the fanatical but shrewd men trying to maintain their control over Iran, and to force the United States into at least tacit agreement that the shah should indeed been be tried for "crimes."

In fact, however, political tension between the past and the present is an immovable barricade along the route toward even the first half of Ghotbzadeh's demand: an investigation of the "crimes" of the shah. From today's perspective, Kennedy's Dec. 2 charge that the shah "ran one of the most violent regimes in the history of mankind" and stole "umpteen billions of dollars" from this country must have looked like an engraved invitation in Tehran.

The fact that a presidential candidate with the influence and following of Teddy Kennedy could be so outspoken about the hated shah might seem to Ghotbzadeh to be evidence that if only American spoke out, it would support his demand.

From an earlier perspective, however, both Carter's subtle anti-shah hints and Kennedy's blunt-instrument attack on the shah have the faint taint of Monday morning quarterbacking. Consider President John Kennedy's private message to the shah (sent 16 days before Kennedy was assassinated), which praised that same regime so damned today by his brother.

Talking about the Soviet political and economic threat to Iran. President Kennedy said he knew the shah fully understood Soviet intentions, a fact "amply evident from the far-reaching reforms that you have undertaken." "Opposition" to these reforms within Iran (partly resulting from a cutback of subsidies to the mullahs and ayatollahs) "was to be expected," Kennedy said, adding: "We therefore respect all the more the courage you have shown in striking at the roots of poverty and social discontent" despite "resistence of favored groups . . . with privileged positions.

Jack Kennedy was not alone in such presidential assessments of the now-scorned shah. Communications similar to Kennedy's (only one of many from Kennedy made available to us by diplomatic sources) went to the shah from every president from Harry Truman to Jimmy Carter.

At the time of Kennedy's Nov. 6, 1963, message, the shah had been in power almost continuously for 22 years, presumably within the time span covered by Teddy Kennedy's reference to "one of the most violent regimes."

In dealing with Ghotbzadeh's "grand jury" demand for a linked probe of the shah's "crimes" and the "crimes" of the United States, Carter cannot escape this written record. A soft response from the United States might indeed hasten freedom for our citizens in their embassy jail. But it would require a rewriting of history as recorded by seven presidents, both in public and private, of monumental proportions.