Egyptian Prime Minister Mamdouh Salem shuffled his Cabinet yesterday, taking over the Interior Ministry himself in an apparent effort to prevent further disturbances after recent rioting.

Salem, 58, a career police officer, dismissed Interior Minister Sayed Hussein Fahmi and three other ministers. Among those retained were the war and foreign ministers.

To help him run the Interior Ministry, Salem appointed as his deputy the head of security services, Gen. Kamal Khierallah, a former riot police commander with a reputation for toughness.

Observers said the moves indicated that Salem plans to deal firmly with any opposition to the government's economic policies during a critical stage of Middle East maneuvering.

Fahmi apparently was removed because he midjudged popular reaction to food price increases. Information Minister Gamal Oteifi was also dropped. Sources said the mass media under his control had not prepared the people for the increases and had performed poorly during the riots. There was no change in the economic team under Deputy Prime Minister Abdel Moneim Kaisouni.

In other Middle East developments:

U.N. Secretary General Kurt Waldheim, opening a 12-day Middle East shuttle mission today, said he believes he can find a way to reconvene the Geneva talks this spring with Palestinian delegates joining the working sessions.

The Palestine Liberation Organization opened an office in Tokyo.