Mayor Marion Barry yesterday chose Judith W. Rogers, a 39-year-old Harvard Law School graduate and former chief city government lobbyist, as D.C. Corporation Counsel. Rogers will be the fourth black and the first woman ever to hold the post as the District's chief lawyer.

Her long-delayed selection ended what was onced billed by top Barry aides and key members of the mayor's transition team as a quest for a "superstar" black lawyer whose appointemnt would have a "big splash and ripple effect in setting the tone of the new administration.

Barry said yesterday he interviewed more than two dozen candidates - including judges, chief lawyers for major federal agencies, persons in prestigious Washington law firms and lawyers from outside the city.

He settled on Rogers, a holdover from the administration of former Mayor Walter E. Washington, Barry said, because she had shown "toughness of mind, legal brillance and firm sensitivity and skill."

"I have never said I was looking for a legal superstar. That was what the press said - I was looking for the best," Barry said yesterday, denying that he had been rebuffed by blacks already in prestigious positions. "My difficulty was not that we could not attract a broad range (of candidates). If I had decided that that was where I wanted to go, I could have persuaded any one of those persons to take the job."

Some aides to the mayor said privately yesterday that Rogers did fit the bill of a black legal superstar. She was a well-qualified and highly respected, though long overlooked, person, they said.

Others said her selection developed in part because some of the candidates Barry interviewed were happy in their present postions.

For example, James Dyke, special assistant to Vice President Mondale, would prefer staying in the White House, the sources said. Togo West was named special assistant to Secretary of Defense Harold W. Brown. H. Patrick Swygert, special councel for the U.S. Office of Personnel, chose to remain there, according to the sources.

Other candidates recommended to Barry included Superior Court Judges John Garrett Penn and Norman Holloway Johnson, Zoning Commissioner Ruby McZier and Elizabeth Hayes Patterson, chairman of the city's Public Service Commission.

Rogers said yesterday that she was not sure what her first priority would be in taking over the 100-lawyer office that has long been considered by many to be in dire need of improvement.

She did say, however, that under her administration it would be a "competent office" for the city's residents. Barry added that he would like to see increased affirmative action in the office, which has been criticized by some in the past for having too few blacks.

Barry was unable to say yesterday what would happen to Louis P. Robbins, who has served as acting corporation counsel since June, when John R. Risher Jr. resigned. Barry also said he has yet to choose a replacement for Rogers as city government lobbyist.

Rogers, who lives on Capitol Hill, came to city government as a legislative aide in 1972 and in 1975 was made a cabinet-level special assistant to Mayor Walter E. Washington.

Rogers directed the transition to the Barry government for Walter Washington. Based largely on her work in that job, she was retained by Barry as an assitant city administrator for intergovenment relations. She has also been an assistant U.S. attorney, and was general counsel to the Nelsen Commission in its study of D.C. government orgazation.

Rogers's appointment yesterday made her the third woman to head a major department in city government in the Barry administration. All three were holdovers from the Washington administration - Rogers, assistant city administartor Gladys Mack (the District's budget director) and Consumer Affairs Director Betty J. Robinson.

Barry also announced yesterday that Arthur Hoyte, 41, an assistant professor at Georgetown Medical School, would become special assistant to the mayor for health affiars. Barry said Carroll B. Harvey, assistant ciry administrator for operations, would become acting director of the Department of General Services next week, when Sam D. Starobin, who submitted his resignation earlier this year, leaves.

For the second time in two weeks, the appointment of Jose Gutierrez as acting director of the D.C. Office of Personnel was announced. Gutierre's selection as the first Hispanic to hold a major appointment in city government was loudly applauded by about a dozen supporters in the audience yesterday. CAPTION: Picture, JUDITH W. ROGERS . . . holdover from last cabinet