Federal prosecutors have doubts about the grand jury testimony of White House aide Richard M. Harden in a case involving an alleged attempt by fugitive financier Robert Vesco to get the Carter administration to fix his legal problems, according to sources.

But the case is still being investigated, and there has been no determination that the questions about Harden's testimony rise to the level of perjury, they said.

A reason for the doubts about Harden, the sources said, is that he gave the same account as that given to authorities by W. Spencer Lee IV, who later failed a lie detector test on his story.

Attention was focused on Harden's testimony yesterday when The New York Times reported that Assistant Attorney General Philip B. Heymann last month told federal grand jurors hearing the case that Harden apparently committed perjury.

Heymann issued a statement late yesterday saying that "at no time in that meeting did I suggest or state a belief that Richard Harden had committed perjury." A Justice Department spokesman said Heymann made yesterday's statement "only in light of the unfairness that would otherwise exist."

It could not be learned which part of Lee's story, and therefore by inference Harden's, is in doubt.

Harden's attorney, Robert B. Altman, said prosecutors have never given him any indication that they had problems with his client's testimony.

Both men said publicly last fall that they talked in Washington in February 1977 about a scheme in which R. L. Herring, a Georgia businessman, paid Lee $10,000 to approach the Carter administration on Vesco's behalf.

Lee repeated in a telephone interview from Albany, Ga., yesterday that Harden talked him out of trying to talk with Hamilton Jordan, a top Carter aide who is now White House chief of staff.

Harden and Lee both insist they never discussed the idea with Jordan. But Harden did tell President Carter about his talk with Lee.

And the president did write a note to then-attorney general Griffin B. Bell instructing him to talk with Lee when he called for an appointment. Bell said he never got the note and that Lee never called.

New attention has been focused on the alleged Vesco obstruction investigation because the foreman of the Washington grand jury investigating the scheme tried to resign earlier this week, claiming that the Justice Department was blocking the investigation to protect the president's aides.

The foreman, Ralph E. Ulmer, said his action was a "protest against the president's reluctance to take steps called for by the involvement of his own aides." He refused to provide specifics about his charges.

Heyman mentioned the doubts about Harden's testimony to several members of the grand jury last month during a meeting designed to placate Ulmer's concerns about the pace of the inquiry, sources said.

Heyman said then that he was checking to see whether the questions about Harden should trigger the special prosecutor provisions of the new Ethics in Government Act, they added. He decided last week to turn the case over to the U.S. attorney for the District of Columbia instead.

U.S. District Court Chief Judge William B. Bryant said he talked with Ulmer for about an hour and a half yesterday and will decide next week whether to allow him to resign as a member and foreman of the jury.

In Plains, Ga., yesterday, President Carter strongly denied the charges that Justice was trying to cover up any wrongdoing by the White House.

"There is too much at stake for the attorney general or the president of the United States to try to subvert the legal system," he said. "It would be politically suicidal . . . It's inconceivable."

Carter said he did give statements to the authorities about his "hazy" recollection of Harden's telling him about Lee and Vesco. He said he wrote the note to Bell because he believed Lee had a report about Vesco and he knew the Justice Department had been trying to get him extradited. Vesco faces charges of stealing a fortune from stockholders of a company.

Last September, when columnist Jack Anderson first reported the allegations about Vesco's approach to the Carter administration, the White House said the president knew nothing of the story.

The White House released information about Harden's talk with Carter only after officials learned that Lee was filing an affidavit mentioning the conversation, in a related stock investigation.

In the telephone interview yesterday, Lee refused to talk about taking a lie detector test. "I can't comment on that," he said. "But I've never been asked to take one. If there is anything to that I suggested it, not the Justice Department."

During the discussion, Lee took a call from Jordon, who he said was in Albany visiting his mother, Lee said he never discussed the Vesco case with Jordan.

A White House spokesman said later that Jordan called Lee to set up a tennis date, not to discuss the case.

Harden's attorney, Altman, said he is convinced that his client was "open and candid" with authorities. He said Harden never has been told that he's a target of an investigation or warned as is customary, that he should recant potentially perjurous testimony.