A federal judge, after conferring privately for more than an hour with Secretary of Labor Raymond J. Donovan, today sentenced an FBI informer to six months in prison for making a false allegation to FBI agents in the course of the Donovan investigations.

But Judge Howard G. Munson said he was "very disturbed" by the case and considered it likely that the informer, Michael Klepfer, was "one of the victims of this entire affair."

Klepfer, 44, an executive of a Binghamton, N.Y., trucking company, was ordered to surrender to federal authorities Feb. 6 to begin serving his sentence. He had pleaded guilty to one count of lying in a plea-bargain arrangement.

He insisted that most of what he told FBI agents had been accurate reflections of what he had been told by a murdered New Jersey figure named Fred Furino.

Munson said Klepfer might be correct. He lamented that Furino, whose 1982 murder remains unsolved, is "not now available" to clarify the matter.

But the judge said he also was persuaded that Donovan, his family and his New Jersey construction company "have been irreparably harmed" by allegations of ties to organized crime against the labor secretary over the past few years, not so much by Klepfer but "by whomever."

The judge then alluded to a remark Donovan had made to him in chambers, without mentioning Donovan by name.

"As one of the persons involved in this case has said," Munson related, "it is like standing behind a screen and having mud thrown at you. You get freckles from that mud, most of which is not removable. I think that that is true of Mr. Klepfer and Mr. Donovan."

Munson said Donovan, now on leave of absence to fight a criminal indictment in the Bronx, spoke of how "grievously harmed" he had been and how difficult it would be for other citizens to take government posts if they had to endure what he has gone through.

A former New York state policeman and a longtime acquaintance of Furino, Klepfer was indicted in March 1983 for a long string of statements to FBI agents about Donovan, most of which he said he had heard from Furino.

After a long round of negotiations between his attorney and government prosecutors, Klepfer pleaded guilty in November to a lying count, not for what he said Furino had told him, but for something Klepfer told the FBI agents investigating Furino's murder.

Klepfer was accused of falsely telling agents that Furino had been killed to keep him from talking about a scheme whereby Donovan had funneled $20 million from the Teamsters Union into the 1980 Reagan presidential campaign. In return, according to the indictment, Klepfer said Donovan was to recommend presidential pardons for two imprisoned felons, organized crime boss Russell Bufalino and former Teamsters Union official Anthony (Tony Pro) Provenzano.

In pleading guilty to a less specific form of that charge, Klepfer said last fall that he had not been told, nor did he have any knowledge that Donovan had received any money for the Reagan campaign. Klepfer also said he knew nothing about any recommendations Donovan was to make regarding "official government matters."

The judge agreed that "all of the people close to this case are troubled by it" but he said he had concluded after struggling "long and hard . . . that Mr. Klepfer must serve some time." The maximum sentence would have been five years.