The file on the foreign-currency bank accounts of Leah Rabin, the wife of the prime minister, will be transferred to the office of the state attorney for prosecution, the Ministry of Finance announced today.

The decision to hand the file over was made after Attorney General Aharon Barak, whose office oversees the state attorney, rejected a suggestion that Mrs. Rabin be asked only to pay a fine for holding the foreign accounts illegally.

The ministry statement also gives details on the Washington bank accounts of the Rabins and the chain of events that led to the prime minister's decision not to head his party's list in next month's general elections.

According to the statement, the lawyer representing Yitzhak and Leah Rabin approached the Ministry of Finance immediately after the Israeli daily Haaretz on Macrh 15 disclosed the bank accounts' existence.

The ministry is charged with implementing the foreign-currency regulations first imposed in 1941, when Israel was under British rule. Several hundred such illegal foreign bank accounts are brought to the ministry's attention each year. In each case it is decided whether to close the file after imposing a penalty or, in more serious cases, to start legal proceedings.

The Rabins' lawyer, the statement continues, said that his clients did not estimate properly and were not aware of the requirement to close the accounts within a reasonable time after they returned to Israel, when their tour in the Washington embassy ended.

The statement emphasizes that both the lawyer and Mrs. Rabin cooperated fully with the ministry and supplied all the documents requested.

There documents showed that when the Rabins left Washington, in March 1973, they had two joint accounts at the National Bank of Washington.

A checking account had $3,886 and a savings account had $14,832. Interest of $2,382 later accumulated in the savings account.

Withdrawals made throughout the years totaled $10,618, and the rest was transfered to Israel after March 15. Of this, $2,282 was the balance in the checking account and the rest was in the savings account.

The ministry statement says that in cases of a foreign-currency account of less than $5,000, the holders are allowed to pay a penalty and no legal proceedings are taken against them.

There are also, however, many cases each year in which the sum exceeds $20,000 but the committee of Ministry of Finance and police officials is satisfied with imposing a fine - either because of "special mitigating circumstances," such as health or the need to support a relative, or because a court trial might jeopardize the sources of information that led to disclosure of the account.

Although the Rabins' case did not fit either of these categories, the committee decided that it merited special consideration, since the very fact that legal proceedings will be started constitutes a severe punishment.

The attorney general, after weighing the case, made it clear that unless the Ministry of Finance intended to relax its standards of foreign-currency control, leniency could not be justified in the Rabins' case.

It is not clear yet whether charges will be filled against the Rabins or, if so, whether the prosecution would demand a jail sentence or, as in most such violations, be satisfied with a fine.

One question still not answered by the announcements and the statements of the past two days is how the Rabins could "over-look" bank accounts that are believed to have constituted a good part of their total wealth.

Rabin, who has been in public service all his life - first in the army and later in the Foreign Ministry and the government - is not considered to be a man of means, and has led a relatively modest life.

Four years ago, just before becoming prime minister, Rabin came under public criticism for having accepted payments for speeches and lectures he made in the United States while serving as Israel's ambassador in Washington. At that time he claimed that he was unaware that Israeli civil service regulations forbid diplomats to be paid for lectures.

The income from these lectures, believed to amount to several tens of thousands of dollars, is generally believed to have gone into the family's penthouse apartment in one of Tel Aviv's fashionable suburbs, which the Rabins bought several years ago.

The Rabins' daughter is married to an army officer. Their son, now serving in the army, is married to an industrialist's daughter.