A federal grand jury in New York yesterday indicted two former labor union officials on charges of conspiring to impede last year's investigation of Labor Secretary Raymond J. Donovan.

Louis Sanzo, former president of Laborers Local 29, and Amadio Petito, once the local's secretary-treasurer, were also accused in separate counts of obstructing justice and perjury about no-show jobs at a subway project undertaken by Donovan's company, the Schiavone Construction Co. of Secaucus, N.J.

The indictment is the result of a six-month investigation by the Justice Department's Organized Crime Strike Force in Brooklyn. It was based largely on grand jury testimony from Sanzo and Petito in February, 1982, during the Donovan investigation.

Special Prosecutor Leon Silverman concluded last summer that "perjury and similar violations of law were committed by persons involved in the no-show scheme," but he said he had no jurisdiction in the matter because "no evidence linked Mr. Donovan to the no-shows."

Sanzo and Petito are in prison following convictions in unrelated cases involving Local 29, known as the Blasters Union. They will be arraigned March 24.

The allegations about "no-show" employes--real or fictitious people in whose names Schiavone made out paychecks but who did not do the work--were made several years ago by Mario Montuoro, a former Local 29 official, and Joyce Cole, the union's bookkeeper. They charged that Sanzo and other officials had cashed the checks for themselves.

The indictment charged that Silverman was trying to determine whether Donovan or other Schiavone officials were involved in such a scheme when Sanzo and Petito conspired to obstruct the inquiry.

The phantom jobs allegedly were set up on a Long Island City subway project that launched Donovan's company into the New York subway building business in 1975. The grand jury charged that Petito and Sanzo had lied about four no-show workers on that job: Artie Martin, now dead; John Busso, who reportedly ran a deodorizing company; Frank Russo, a fictional person, and an individual called "John Doe" in the indictment.

Sanzo and Petito were accused of plotting to get "John Doe" to make false and misleading statements during the Silverman investigation and of promising, in turn, to "direct customers to John Doe's business."

Government prosecutors declined to comment on "John Doe's" identity, but details in Silverman's report indicate that he is Carmine Buonanno, owner of a New York construction business. Records for the Long Island City subway project show that $21,542 in paychecks were issued in his name in 1977 and 1978.

Each of three counts against Sanzo and Petito carries a maximum prison term of five years and fines ranging from $5,000 to $10,000.

Labeled by government prosecutors in 1981 as a willing "front" for the Lucchese family of the Mafia, Sanzo is serving a three-year prison term for tax evasion and conspiracy to evade taxes. Petito was sentenced to four years in prison for contempt and perjury in the course of that same investigation.