Islamic revolutionary firing squads today executed five men, including three for sexual offenses, despite a decree by Ayatollah Ruhollah Khomeini this month restricting the death penalty to those responsible for murders or torture under the deposed shah.

The latest executions came as Tehran's revolutionary prosecutor announced that 30 prominent figures in the previous government will go on trial shortly. They include a former housing minister, 15 former members of parliament, a former newspaper editor and a senior official in Shah Mohammad Reza Pahlavi's political party, Rastakhiz.

A group of Iranian lawyers discussed the relovutionary trials with the public prosecutor today and reportedly protested the secretive proceedings and lack of due process. One lawyer said the group found the meeting "very frustrating."

It was not immediately clear whether two Jewish legislators will be among the former officials to be tried soon.

A French Jewish lawyer and Nazi hunter, Serge Klarsfeld, is in Tehran to investigate the reasons for the recent execution of a millionaire Jewish industrialist and reports that several members of Iran's increasingly nervous Jewish community have been arrested.

Klarsfeld said Iranian Foreign Minister Ibrahim Yazdi told him the industrialist, Habib Elghanian, was executed not because he was a Jew, but for alleged crimes under the shah's government.

Authorities said after his execution that he was convicted of spying for Israel, meeting with Israeli officials and contributing to massacres of Palestinians by donating funds to the Jewish state.

In apparent response to an international furor over the execution of Elghanian and other political prisoners, Khomeini declared May 14 that death sentences must apply only to those proved to have ordered or participated in torture or massacres. Since then, a number of police, military and secret police officials have been tried and shot.

Early today the firing squads executed two convicted homesexuals and a rapist. A revolutionary court statement said two men were "found guilty of offending public decency and having homosexual affairs." The third man was executed on charges of raping his 9-year-old niece.

A Tehran newspaper reported that the two homosexuals had been charged with sodomizing a young boy.

The court announcement said the execution was part of "a campaign to purge Iran of corrupt elements." Their deaths brought the number of sex offenders executed by the revolutionary government to 19.

With the execution after separate trial of a former army officer and gendarmerie captain, at least 229 former officials and prominent figures have been shot.