Iran's February revolution brought some of Shah Mohammad Reza Pahlavi's fabulous palaces and stately homes within reach of the country's poor families for the first time.

In this hot and dusty capital, scores of houses and apartments have been seized by families from the teeming slums of south Tehran, including some of the houses formerly owned by agents of SAVAK, the shah's secret police.

The biggest and the best, however, have been reserved for the Bonyad Mostazafain, one of several foundations set up by Moslem leader Ayatollah Ruhollah Khomeini to help the poor.

The shah's palace of Niavaran is likely to become a museum, with his fabulous furnishings encased in glass to remind Iranians of "the opulence enjoyed by their former head of state." The shady gardens of his court ministry at Saadabad have already been transformed into a rifle range for Islamic militiamen.

Many of the villas that once housed the shah's relatives or close aides and generals have been turned into orphanages, homes for the disabled or rehabilitation centers for prostitutes.

However, Iran's revolutionary authorities have also confiscated hundreds of houses, apartments and other personal property belonging to wealthy Iranians who have not been convicted of any crimes. Many of these properties have been turned over to organizations such as the Bonyad Mostazagain, but some of them have become the private possessions of the Islamic revolutionaries.

SOME OF Tehran's luckiest children this summer live in the elegant villa owned by Habib Elghanian, an Iranian Jewish tycoon executed in May after being found guilty of corruption and spying for Israel. Where a single family formerly entertained the cream of Iranian society, 96 young girls - many without parents - romp in the kidney-shaped swimming pool or play with dolls and scrapbooks in the cool of a living room where the floor is covered with fine marble and walls are lined with velvet.

All of the furnishings have been confiscated by the Bonyad. Television sets and kitchen stoves have been given to poor families in south Tehran. The more marketable tables, chairs and cabinets have been sent to a local department store or auctioned off. All proceeds are supposed to be returned to the Bonyad.

THOUSANDS OF ANTIQUES, fine Persian carpets and 19th-century Qajar paintings - popularized by Empress Farah - in houses such as Elghanian's have been trucked to a large warehouse outside the small town of Karaj, west of Tehran. The most historically valuable are to be kept for the nation's museums and the rest are to be sold, probably through European auction houses.

The new orphanage is one of 407 buildings and housing units controlled by Bonyad. Abol-Ghassem Sahadehzadeh, the organization's chief, who spent 14 of his 33 years in jail, says Bonyad is working from a list of 600 former elite families. He added, "We suspect hundreds more villas and apartments remain to be located."

Bonyad is houses in a luxury office building constructed by the Elghanian family that before the revolution was to have been rented to Iran's atomic energy organization.

TWENTY FORMER prostitutes have been rehoused in the opulent former residence of Habib Sabet, a self-made multimillionaire who built a small bicycle repair shop into a large industrial group that included Pepsi-Cola and Iran's first television station. The various buildings, constructed by European craftsmen, are almost a perfect copy of Le Petit Trianon at Versailles.

Now, black veils drying in the bright sun hang on the stately balconies. The sweeping driveway is empty except for a small statue of a young girl, and an old motorcycle propped against the pink marble pillars.

The women have exchanged their former profession for lessons in flower-arranging, typing and cooking. Prayers are not mandatory, but most kneel toward Mecca three times a day.