A Boston stockbroker who is accused of bilking customers out of more than $3 million was formally charged this week by a federal grand jury with 39 counts of mail fraud and one count of bank fraud.

The charges were leveled against Walter Curran, 46, of Wellesley, a former broker for the investment firm of Dean Witter Reynolds, U.S. Attorney Jeremiah O'Sullivan said.Curran was arrested Feb. 17 as he tried to cross the U.S.-Canadian border at Massena, N.Y., with more than $130,000 in cash in his possession. He has been held in federal custody since then.

The indictment charged that between March 1, 1981, and Feb. 17, 1989, Curran defrauded customers of more than $3 million by telling them he would make investments for them in deferred compensation employee savings accounts with Dean Witter and then converting the money for his own purposes.

Curran promised the investors their money would earn 20 percent interest in the account, and he provided them with false account statements to back up his scam, the indictment said.