The Soviet government newspaper Izvestia alleged today that several U.S. diplomats here were engaged in espionage and said they had recruited Jewish dissidents to aid them in their efforts.

The allegations were contained in an "open letter" signed by a Jewish doctor, Sanya Lipavsky, who said he had been a dissident himself, and in an unsigned accompanying article apparently meant to lend official weight to the accusations.

The attack was spread across two pages of the authoritative paper, which normally prints eight pages only.

The Soviet action was taken to be intended as a message to President Carter that Moscow will not be deterred in its drive to silence its internal dissidents by any American statements on human rights. It is also seen as part of a growing pattern of sharp and immediate Soviet counteractions to Carter administration statements about human rights in Eastern Europe.

To ordinary Russians, it comes as a dramatic warning to stay away from foreigners, particularly diplomats and journalists.

The blast seemed designed to show that American contacts with dissidents here have subversive purposes - part of the continuing Soviet campaign to discredit the activists and the foreigners who are in touch with them.

The charges were directed primarily at Joseph Presel, a first secretary in the embassy's political section and a former first secretary, Melvin Levitsky, who left the Soviet Union in 1975. Both men were considered specialists in human rights and dissent problems in the Soviet Union.

The letter said that prominent figures in the Jewish emigration movement were enlisted as American agents. Most of those named are no longer in the Soviet Union, but of those who still are at least one couple - the Alexander Lerners - were undergoing police searches at their apartment tonight.

Several American correspondents, including me, were also said to be in "frequent contact" with the Jews and espionage charges were levelled at George Krimsky, the Associated Press correspondent who was recently expelled and former Newsweek correspondent Alfred Friendly Jr. Krimsky and Friendly have repeatedly denied spy charges against them.

The focus of this attack, however, was on the purported effort of American diplomats to recruit Jews who had been refused permission to emigrate as agents for the Central Intelligence Agency. The letter said, for instance, that Levitsky, had sought to recruit the chief of a scientific research center near Moscow into the CIA with Lipavsky's help.

Contact between American diplomats and dissidents here was extremely limited until about a year ago. Then, as relations between Moscow and Washington chilled, more of the diplomats sought out such meetings quietly. One objective of this article may be to end those meetings.

When President Carter sent his letter to Andrei Sakharov, the Nobel Peace Prize winner and dissident, two weeks ago it was delivered to Sakharov at the embassy - an unprecedentedly open gesture for official Americans here.

This week two Jews tried to enter the embassy accompanied by a consular official but were repeatedly turned back and taken away for questioning by Soviet police who guard the entrances to the building. U.S. officials twice protested to the Soviets over those incidents.

Lipavsky, who was well known to me and other correspondents, said he was a doctor in a suburban hospital and later at a bus depot. He applied to emigrate to Israel in 1975 but said he had been turned down because his small suburban house adjoined the installation where Soviet cosmonauts live. A month or so ago he indicated that he had left his wife and small child and was living in a Moscow flat with another dissident, Anatoly Sharansky, whom he also accused of spying.

In his letter Lipavsky said he had known dissidents for five years and that they had "one platform and one leader - American intelligence and anti-Soviet organizations."

Presel, the only diplomat currently assigned in Moscow to be named in the letter and article, is presently on medical leave in West Germany. "We could provide other documentary evidence on the activities of certain 'diplomats' in the American embassy in the USSR," Izvestia said.