A New York prosecutor charged yesterday that last month's killing of Nat Masselli was a planned execution, and refused to rule out the possibility of a connection between it and the just-ended federal investigation of Secretary of Labor Raymond J. Donovan.

James Shalleck, the head of the Bronx district attorney's homicide bureau, made the statements yesterday in Bronx Supreme Court at an hour-long hearing for Salvatore Odierno, a reputed "soldier" in the Genovese crime family who has been indicted for murder in the slaying.

Odierno and Philip Buono, a reputed Genovese crime family captain who was arrested Wednesday as a second suspect, were ordered held without bond at separate hearings yesterday.

Masselli, 31, was a witness in the nine-month Donovan investigation, which special prosecutor Leon Silverman brought to a close Monday. Silverman said there was "insufficient credible evidence" of any links between Donovan and organized crime and no evidence "to date" of a connection between his investigation and Masselli's death.

Odierno's lawyer, Louis Aidala, emphasized Silverman's report in an unsuccessful bid to have his client released on bond.

Shalleck replied that "regardless of the Silverman report, the district attorney of this county is not excluding any motive" for the killing.

One of the Silverman's main lines of inquiry had involved charges that Donovan's New Jersey construction company was "mobbed up" through its contacts with Nat Masselli's father, William Masselli, and an excavation firm, Jopel Construction and Trucking, that William Masselli headed.

Jopel was a subcontractor for Donovan's firm, Schiavone Construction, on a series of New York City subway projects. William Masselli is a reputed member of the same branch of the Genovese family that Buono allegedly heads.

Nat Masselli was shot in the back of the head Aug. 25 after visiting his imprisoned father. After the visit, according to investigators, the younger Masselli drove to a social club in the south Bronx where Buono and others had just had a dinner meeting.

Masselli then proceeded to a well-lit residential neighborhood in the Bronx. The two men believed to have been his assailants jumped out of Masselli's car and fled in a red Pontiac that had been trailing behind. It was traced to Odierno.

"This was an execution," Shalleck charged in the courtroom. "It may not have been planned" to take place where it did, he said, "but it was planned earlier in the evening."