The White House appointed two new members to the presidential AIDS commission yesterday, replacing two physicians who resigned abruptly last month with a state public health official and a doctor who specializes in the treatment of drug addiction.

The appointments of Dr. Beny J. Primm, 59, of New York, and Kristine M. Gebbie, 44, Oregon's state health administrator, were applauded by health officials and gay rights activists. These groups have sharply criticized the panel's lack of expertise about acquired immune deficiency syndrome and the controversial views of some of its members.

"We think these are good appointments and a step in the right direction, but this doesn't satisfactorily balance the commission in conformance with the law," said William B. Rubenstein, an attorney for the American Civil Liberties Union. The ACLU and several public-interest groups have sued the commission, charging that it violates federal law governing advisory commissions because it lacks ideological balance and includes no members of groups most affected by AIDS. The case is pending in U.S. District Court here.

Jeffrey Levi, executive director of the National Gay and Lesbian Task Force, applauded the appointment of Gebbie, an outspoken opponent of the Reagan administration's AIDS testing policies. "She adds a voice of reason to what is otherwise a disappointing assemblage," he said.

Gebbie, a nurse who chairs the AIDS Task Force for the Association of State and Territorial Health Officers, said she "did a lot of thinking" about whether to accept an appointment after White House officials approached her last week. Gebbie said she was particularly hesitant because of the departure last month of Dr. W. Eugene Mayberry and Dr. Woodrow A. Myers Jr., the chairman and vice chairman who resigned citing infighting and ideological differences on the panel.

"Admiral Watkins and I had a long talk," said Gebbie, referring to the panel's new chairman, James D. Watkins, "and he seemed to share my perceptions that the experience of state public health must be represented. I decided to give it a try."

Primm, who could not be reached, has criticized the federal government's efforts to combat AIDS among intravenous drug users and blacks. Primm, who is black, has said he has made enemies in the black community by challenging the view that AIDS is primarily a disease of gay white men.

Watkins, who was traveling with commission members in Miami yesterday, said he was "delighted by the new appointments" and remains committed to meeting the Dec. 7 deadline for a preliminary report.

The commission is responsible for advising President Reagan on the legal, ethical, medical, social and economic impact of AIDS, which has struck more than 45,000 Americans.