After months of congressional hearings into the Abscam "sting" investigation, FBI Director William H. Webster, who had been working to improve the bureau's image after the domestic spying, illegal wiretaps and "black bag jobs" of the 1970s, believes the FBI has come through almost unscathed and at the same time has learned some lessons.

"As a clear picture emerges," Webster said in an interview last week, "it seems to me there's an increasing base of support from public officials. There's been widespread support from the beginning from the public who want to be sure the FBI, of all organizations, is not afraid to attack the tough ones."

Webster, a former federal judge from St. Louis, has spent much of the past several months dealing with a special Senate committee looking into Abscam, the investigation that shook up many on Capitol Hill and led to bribery convictions of seven members of Congress and several lower-level public officials.

"We've learned in spades we must be prepared to account for our investigations of public officials," Webster said. "We spent almost as much time before congressional committees as we spent in court.

"I say that facetiously. . . . I don't think that's wasted time, but I would hope once Congress and others are satisfied with [our] procedures . . . that we would be able to go forward without case-by-case repetition of these hearings."

James Neal, special counsel to the Senate Abscam committee but better known for his role as chief prosecutor at the Watergate cover-up trial, said after the Abscam hearings that while some changes may be recommended in the FBI's conduct of undercover operations, "we have not found a smoking gun in Abscam."

Webster said he believes the FBI could have done a better job. "I wish now we had more documentation. But [we] always improve on the next operation," he said.

Because of the publicity Abscam generated, Webster said the FBI has been forced to change some of its undercover scenarios and take extra precautions because of the obvious parallels to Abscam. "Those are operational judgments, but there hasn't been any drawing back on our willingness to follow leads regardless of where they take us," he said, adding that if the FBI hears about corruption involving any high-level public figure, "we'd go right ahead."

A Republican who took over the agency in early 1978, Webster, within his first year on the job, fired two FBI supervisors and disciplined others for their roles in surveillance of the Weather Underground. In a symbolic change, he also quietly moved the bust of former director J. Edgar Hoover out of his office and onto the route of public FBI tours.

Sources in the FBI say Webster is a strict disciplinarian who has been especially sensitive to corruption accusations against agents. Webster said that, although there have been cases of agents being corrupted by organized crime figures during his tenure, he knows of no outright infiltration of the bureau by criminals or foreign operatives.

Reacting to occasional reports that the FBI has been infiltrated by a Soviet "mole," a clandestine agent planted some time ago, Webster said, "We pull out all the stops when we get that kind of report."

Webster is one of the most popular government officials on Capitol Hill, where members of Congress react favorably to his direct answers and low-key, unpretentious style. In the aftermath of Abscam, the American Civil Liberties Union has called on Congress to restrict the FBI's use of undercover techniques.

". . . The ACLU report is . . . trying to find ammunition for the position they have always held, that you should have a court order for informants or undercover investigations," Webster said.

He said he would prefer to keep the system of guidelines that he said allow flexibility in changing undercover situations.

Since January, the bureau has been expanding its drug trafficking investigations, particularly those related to organized crime. Under a Justice Department reorganization, the Drug Enforcement Administration reports directly to Webster, and the bureau is involved with more than 800 drug cases, including more than 200 cases jointly with DEA.

Hoover steadfastly refused to bring the FBI into this, arguing that too much money was involved in narcotics and that the possibilities for corruption of agents were too great. Webster said he decided to change the policy because "it has become increasingly clear to us that drugs and narcotics were responsible for more crime, more corruption of public officials, more harm to our children and families than any other single criminal activity.

"I had to ask myself what the FBI was doing to help that problem," Webster said. "We had developed the expertise in undercover work -- not just the street buy and bust -- but actually getting into the apparatus. . . .

"It meant facing the possibility of agents being corrupted, it meant taking on a number of other problems, but I was convinced of the quality of our agents, that their dedication, ability and discipline could stand up to that," he said.

Webster has assigned 500 of his 7,800 agents this year to drug-related investigations. Last week, the Reagan administration announced a $200 million plan for 12 regional task forces, made up mostly of FBI and DEA agents, to concentrate on organized crime and drug trafficking. Some senior Justice Department officials criticized the plan as too political and unwieldy, however.

Webster said unprecedented numbers of arrests and convictions of high-level organized crime figures have been made in the last two years. Top mob figures, in many cases a so-called "boss," have been convicted in 10 cities and in 14 of the 25 traditional organized-crime families, he said.

Other FBI officials said they generally feel they are finally on the right track following the civil rights abuses and the tarnished image of a decade ago. They see only one last obstacle: the Senate Labor Committee investigation into the FBI's handling of the background check on Labor Secretary Raymond J. Donovan.

Some senators complained that during Donovan's confirmation hearings, the FBI may have delayed or withheld information about alleged links between Donovan and organized crime figures. Webster said he is convinced that the bureau did nothing wrong and that the investigation will be closed uneventfully.

"The FBI did what it has historically done in the way it has historically done it . . . there were housekeeping errors . . . but I don't believe any of those housekeeping errors would have affected any senator's final judgment," Webster said.