Montgomery County Health Department Director W. Lewis Holder resigned his post Tuesday, six days after a county administrator rebuked him for mishandling an inquiry into allegations that department records were doctored two years ago.

The announcement by Holder, who was appointed to the $69,000-a-year job in July 1982, stunned some county officials. The officials said they were shocked that Holder, a 15-year veteran of county government, would quit because Chief Administrative Officer Lewis T. Roberts publicized an internal Sept. 7 memo to Holder criticizing him for the way he handled an internal investigation of a health department division.

Holder declined comment yesterday on the resignation. But in a letter he delivered to County Executive Charles W. Gilchrist, Holder said he resigned because of Roberts' "highly unusual act" of releasing the Sept. 7 memo.

"I feel that this degree of censure, whether or not in public, is . . . unfair to me," Holder, 57, said in the letter. "Criticizing (me) via a release to the press is unacceptable to me personally and professionally."

Gilchrist, who said he accepted Holder's resignation with "great regret," has not named an acting director of the 622-employe department.

Holder promised officials he would stay on the job until a successor is named.

In his memo to Holder last week, Roberts sternly criticized the health director for his handling of an investigation into record-keeping in the division of wells, which for the past nine months has been investigated by state law enforcement officials.

The investigation has focused on allegations that more than 60 water tests at 18 Montgomery subdivisions in various stages of development were doctored in 1980 and 1981, said David A. Newcomer in the major frauds unit of the State's Attorney office.

The results of such tests, which measure how porous the soil is, must be certified by the health department and can determine whether a tract of land will be developed.

"It appears that some documents were altered," said Newcomer, adding that he hopes to conclude his investigation next month.

Holder left the health department in September 1981. When he returned to become health director 10 months later, he was directed by Roberts to conduct an inquiry into the old records and ensure that the old and new records would remain safe from tampering, Roberts said yesterday.

In his memo, Roberts chastised Holder, saying "I must conclude that this matter was poorly handled, in that the investigation by health officials was never satisfactorily concluded."

In a letter to Holder, Gilchrist defended Roberts' memo, saying its release was not intended as a "rebuke or censure of your leadership."

The memo "made clear that the the events which are subject of investigation occurred . . . long before your tenure," Gilchrist said.

Privately, some top officials said they tried to persuade Holder, who they called "personable" and "thoroughly professional," not to resign.