Republican Congressman Robert E. Bauman of Maryland faced with a charge of soliciting sex from a teen-aged boy, has agreed to enter a court-supervised rehabilitation program in the District of Columbia.

Bauman, 43, a third-term congressman from the Eastern Shore, said in a statement last night that the incident for which he was being investigated occurred at a time when he was suffering from "acute alcoholism."

He is scheduled to appear in D.C. Superior Court this morning to be formally charged with the misdeanor offense of solicitation, a charge that prosecutors plan to put aside if Bauman enters and successfully completes the rehabilitation program for first offenders.

The charge follows a Justice Department investigation of allegations that Bauman solicited and then performed oral sodomy on a 16-year-old early this year near Capitol Hill. According to sources, the investigation was prompted by an informant's claim that the congressman was involved in homosexual solicitations of minors.

Bauman did not fully respond to those allegations in the statement he released last night. He attributed his problems to a struggle with alcoholism that he said he has overcome in recent months.

"As a result of the help I have received from my wife and family, my priest, my doctor, and Alcoholics Anonymous, my own alcoholism is now under control and my sobriety restored," said Bauman. "Equally important, I have confessed my sin, as my religion requires, and I am in the state of grace and will remain so with the help of God. For the first time in my life, I have come to terms w ith my personal problem, admitted my faults and am trying to make amends."

Bauman, recognized as a parliamentary magician on the House floor and an eloquent national spokesman for conservative causes, is seeking reelection this fall in Maryland's 1st Congressional District against Roy Tyson, a Democratic state legislator whom he defeated four years ago and who was not considered much of a threat this year.

In his statement last night, Bauman indicated that he would not withdraw from the race. "I will submit myself to the judgement of the citizens in my district on the basis of the record I have had in the past," said Bauman. "I strongly emphasize that this allegation involves only my personal conduct and has nothing to do with my office or duties. My drinking occurred away from my official duties and did not impair my work."

Bauman, who is married and lives in Easton with his wife, Carol, and four children, said that the Rev. John Harvey, a friend of 20 years, and Dr. John Kinnane, a psychologist from Silver Spring, have "made it possible for me to confront and combat my alcoholism." He said that his court rehabilitation program will specify that "I will continue with the guidance and help of Dr. Kinnane and Father Harvey."

Bauman said he had been informed off the "allegations . . . concerning my personal conduct" several weeks ago by the U.S. attorney's office in Washington. He said that the alleged incident occurred "during the period of my heaviest drinking last winter." Prosecutors refused to comment on the case yesterday.

Bauman's popularity in Maryland and prominence as a persuasive champion of conservatism had reached the level earlier this year that he seriously considered challenging Maryland's incumbent Republican senator, liberal Charles McC. Mathias, in the GOP primary. He was persuaded to drop that idea after several weeks of highly publicized consideration, and devoted his energies instead to serving as vice chairman of the state's delegation at the Republican National Convention and as a leader of the Maryland effort for presidential nominee Ronald Reagan, whom he had strongly supported for years.

Many state Republican leaders considered Bauman a likely candidate for the U.S. Senate two years from now, when Democrat Paul Sarbanes runs for reelection.

The outspoken congressman, who was one of the founders of the 20,000-member American Conservative Union, has made no secret of his ambitions on Capitol Hill. An orphan who was adopted by an insurance salesman, he spent 15 years on the Hill as a page and legislative aide before winning his seat to represent the sprawling 1st District -- which includes 13 of Maryland's 26 counties -- in 1973.

"I distrust government in all its forms." Bauman said in that first race. But while distrusting government, he became a master at the art of politics. Shortly after taking his seat, in fact, he propelled himself out of the obsurity normally assigned to freshmen and took a position of informal leadership on the House floor.

A self-described watchdog who has often blocked House Democrats with parliamentary maneuvering, Bauman is sought out by reporters for his commentary on foreign policy and his sometimes caustic witticisms on liberal colleagues. "Every legislative body has a Bauman," House Speaker Thomas (Tip) O'Neill once said of him. "He's tough and he certainly irks the leadership when he tries to get things done."

In 1979, Bauman was the leader of a rear-guard battle by House conservatives against the Panama Canal treaties. He is a leading opponent of abortion and was once credited by Rep. Henry Hyde for suggesting the famous "Hyde amendment" that strictly limits the use of federal funds for abortions.

His attempts to slash spending and alter policy with amendments to House bills have been frequent and well-publicized. In 1977, he tried to strip appropriations from the Washington office of Andrew Young, then the U.N. ambassador. "More recently, Bauman attempted to stop U.S. aid to Nicaragua under the Sandinista government until Congress could determine whether the country was "going to be another Cuba."