Leah Rabin, wife of Israel's prime minister, was fined nearly $27,000 in Tel Aviv district court today after pleading guilty to charges that she held two illegal bank accounts in the United States.

Disclosure of the accounts led Prime Minister Yitzhak Rabin to resign as leader of the ruling Labor Party and forfeit his chances to be returned to office in the national elections next month.

Judge Dov Levin offered Mrs. Rabin the alternative of serving a year in prison but she said she would pay the fine.

Levin could have imposed the maximum three-year sentence. He said, however, that Mrs. Rabin had already suffered enough "in her downfall from a position of importance to the benches of the courtooms."

The prime minister, who last week was fined $1,600 for his involvement in the bank accounts, told his Cabinet today that he will take a leave of absence beginning Friday and stay out of government affairs until after the May 17 elections.

The accounts in question reportedly contained a maximum balance of $21,101.

Mrs. Rabin was tried under a law that prohibits Israelis from holding foreign currency accounts unless authorized to do so.

Mrs. Rabin told the court: "I am guilty."

After a brief presentation by the defense and prosecution, she said, "I don't have anything to add."

Rabin had accompanied his wife to the court, kissed her, and then left before the trial got under way.

Mrs. Rabin's lawyer, Shimon Alexandroni, told the court, "She is very sorry about her negligence and mistake."

He also said the money in the accounts was not from illegal sources.

The Rabins said the accounts were left over from Rabin's service in Washington as Israeli ambassador, but acknowledged they should have been closed within six months after he returned to Israel in 1973.

In other developments:

An Israeli newspaper said the U.S. State Department has concluded the Soivet Union is seeking to restore diplomatic relations with Israel, possibly by summer.

The Kremlin broke relations during the 1967 Middle East war. Romania is the only Soviet bloc country with diplomatic ties to Israel.

The Jerusalem Post said Washington "has picked up several significant indications of a gradual Soviet movement in this direction."

Israeli soldiers used tear gas to disperse about 200 stone-throwing Arab student demonstrators in the town of Nablus in the occupied West Bank of the Jordan River, military authorities said.

Israel state radio said the demonstration was staged to protect a bid by the militant Jewish Defense League to build a Jewish settlement near Nablus.