Seeking to block a state court trial in the Bronx, Labor Secretary Raymond J. Donovan maintained today that he was entitled to be tried in federal court because he has been accused "of knowingly stealing federal dollars."

Testifying publicly about his criminal indictment for the first time, Donovan spent more than three hours on the witness stand here in an effort to have his case severed from that of the other defendants facing trial with him on charges of fraud and grand larceny.

The extraordinary session was held before U.S. District Court Judge Lloyd F. MacMahon under a so-called "removal" statute dating back to 1815. It was enacted, according to Donovan's lawyers, "to protect federal officials from interference by hostile state courts."

Bronx prosecutors protested that the indictment against Donovan deals strictly with his pre-Cabinet-appointment conduct as executive vice president of a New Jersey firm, Schiavone Construction Co., in connection with a $186 million federally funded New York City subway project.

The prosecution has charged that Donovan, seven current Schiavone executives and two other men affiliated with a mob-controlled subcontractor joined together in 1979 in a scheme to bilk the New York City Transit Authority of about $8 million in payments that were supposed to go to minority business enterprises (MBEs) on the project in question.

According to Bronx authorities, the subcontractor, Jopel Contracting and Trucking, was a phony MBE organized by a reputed Mafia "soldier" named William Masselli who established himself with Schiavone Construction by muscling aside another subcontractor, Louis Nargi, now dead.

Questioned publicly about these matters for the first time, Donovan portrayed himself as a top-ranking executive too busy with high finance and 1980 pro-Reagan politicking to have even been aware of such workaday matters as Nargi's financial problems and Masselli's subsequent takeover.

Donovan testified that "to the best of my knowledge," he had never even been advised of complaints about Nargi's performance in 1976, shortly before Masselli took over.

A member of the state prosecution team then read from a Jan. 18, 1982, interview that Donovan gave to special federal prosecutor Leon Silverman at the outset of Silverman's investigation of alleged ties between Donovan and organized-crime figures.

"Mr. Donovan stated that he had heard complaints about Nargi's performance on the job prior to Nargi's being replaced by Masselli," according to a summary of the interview compiled by one of Silverman's lawyers.

Donovan acknowledged that he must have said as much "if that's in the report."

Donovan also said he did not think he knew that Masselli, whose nickname was "Billy the Butcher," had been in the wholesale meat business before forming Jopel. Donovan said he thought he did remember Masselli's "bringing six-packs of steaks to the secretaries" but Donovan said he thought Masselli had some prior experience in construction work as well.