A D.C. Superior Court judge yesterday sternly reprimanded a government prosecutor for "demonstrating extemely poor judgment" while making inquiries about a defense witness, but refused to declare a mistrial or dismiss second-degree murder and perjury charges against former Washington abortionist Dr. Robert J. Sherman.

Judge Fred B. Ugast rejected charges by Sherman's defense lawyers that actions by the government amounted to "prosecutorial misconduct." Ugast, who held lengthy, private conferences in his chambers last week in connection with the charges, said he found no evidence that the prosecution had deliberately tried to harass or intimidate defense witnesses.

"At worst, the government actions . . . have perhaps made more difficult an already difficult defense task," Ugast said in a long handwritten decision which he read to prosecution and defense lawyers early yesterday afternoon.

The jury of seven women and five men, who have heard almost five weeks of testimony in connection with the Sherman case, has not been present in the courtroom for any discussion of the defense allegations.

Once Ugast announced his ruling, the jury heard continued testimony from Dr. Thomas H. Gresinger, whose appearance as an expert witness for the defense had been at the center of dispute about government contracts with defense witnesses. Gresinger is medical director of the Center, an abortion clinic in Fairfax Northern Virginia Women's Medical County.

Ugast made it clear yesterday that "it is proper and may even be the duty" of attorneys or investiagtors for the prosecution and defense to contact opposing witnesses about the nature of their testimony.

When the government learned Nov. 20 that Gresinger would be a defense witness, Assistant U. S. Attorney Whitney Adams contacted Dr. Paul J. Hergenroeder, a Northern Virginia obstetrician and gynecologist to inquire about Gresinger.

Although he did not name Adams, Ugast said "the prosecutor's failure" to warn Hergenroeder to "avoid any appearance of intimidation or harassment" should he made his own inquiries about Gresinger was "a significant omission demonstrating extremely poor judgment in a highly sensitive matter."

Hergenroeder was an atteneing physician at D.C. General Hospital in March 1975 when 16-year-old Rita McDowell was admitted there. McDowell's death four days after she went to Sherman's clinic for an abortion is the basis of the criminal charges. Hergenroeder has also consulted with the government before and during Sherman's trial on technical medical matters.

Hergenroeder apparently became concerned, Ugast said, when Adams described what she understood were practice at the Northern Virginia clinic, as described to her during an earlier conversation with Gresinger. Hegenroeder then telephoned Sharon McCann, administrator of the Northern Virginia clinic, and indicated if such practice were followed he could no longer refer patients to the clinic, Ugast said.

Hergenroeder also spoke to Gresinger that evening but denied he attempted to dissuade Gresinger from testifying at the Sherman trial, Ugast said.

The judge, who spoke at length with Hegenroeder in his Superior Court chambers last week, said" I must question whether he has fully disclosed additional, albeit secondary, motives for making the calls in light of his personal involvement in the case and his feeling that Dr. Sherman has violated proper medical practices."

While Hegenroeder may have hoped to influence Gresinger's testimony, he's responsible for statements he may have made, Ugast said.

Hergenroeder could not be reached for comment yesterday.

According to the defense, 'McCann then conveyed Hergenroeder's statements to Gresinger. Ugast noted, however, that Gresinger had said he intended to testify fully and that his statements in court would not be affected by the telephone calls.

Gresinger, who testified extensively for the defense yesterday about abortion techniques, said in a later interview that he decided to testify because "I knew darn well that if somebody didn't come forward and represent the way things are there was a fair chance (Sherman) would get railroaded.

"Even the worst guys deserve to have their own experts," Gresinger said.

But, Gresinger said, "I'm scared. I think something bad will happen to me. I'm afraid there will be guilt by association."