The American Institute of Architects, under heavy pressure from the Justice Department, voted yesterday to permit members to advertise in publications.

The vote was 82 percent in favor of the change in the AIA code of ethics, and the second major code change in two days at the AIA's national convention here. The organization, to which more than half the nation's architects belong, voted Tuesday to allow members to act as contractors.

The latest rule change allows members to "purchase dignified advertisements and listings only in newspapers, periodicals, directories or other publications indicating firm name, address, telephone number, staff descriptions of field of practice in which qualified."

The advertisements are not allowed to include testimonials, photographs or comparative references to other architects.

AIA President Elmer E. Botsai, in an interview had strong words against Justice's investigation of AIA's ethics code regarding advertising. Botsai estimated that to defend it in litigation with Justice would cost about $1.5 million.

The Supreme Court decided a year ago in a case involving the Arizona Bar Association that advertising "to inform the public of the availability and nature of products and services" is entitled to the protection of the First Amendment. The American Bar Association revised its code last August to allow advertising, including radio but not television.

An AIA task force headed by Robert Lawrence of Oklahoma recommended adopting the rule change, and it passed with little discussion. It carries a safeguard against members making exaggerated, misleading, false statements or claims.

Last night, AIA gave its highest award, a gold medal, to architect Philip Johnson of New York City and New Caanan, Conn., whose Dallas structures include Thanks Giving Square and many houses. In Washington Johnson designed the pre-Columbian wing of Dumbarton Oaks and the David Lloyd Kreeger house.