A federal grand jury in Alexandria is investigating possible violations of federal safety regulations by construction firms that employed two workers killed in a Fairfax County construction site accident in 1973.

The grand jury invesitgation, now in its sixth month, marks the first time that the local grand jury has investigated companies or individuals in connection with safety violations in the Northern Virginia building industry, according to a highly placed federal source.

The firms under investigation are the S. O. Jennings Construction Corp., the Bur-Mar Construction Corp., both of Fairfax City, and other unnamed companies and individuals, according to papers filed in the matter.

Jennings and Bru-Mar employed two workers who were killed on July 18, 1978, when an unsupported trench in which they were working collapsed on top of them, the papers state.

Yesterday, U.S. District Judge Oren R. Lewis ordered the firms to turn over immediately to federal prosecutors working with the grand jury documents on the ownership of and relationship between the two companies and other unspecified papers.

Although grand jury investigations are secret, the current probe was disclosed when prosecutor Karen P. Tandy filed a public affidavit seeking to obtain the documents for the grand jury.

Michael McGettigan, attorney for the firms, told Lewis the companies will comply with the order. McGettigan declined further comment.

The workers, Michael DeGroot, 25, and Robert Joseph Baker, 25, both of Falls Church, were buried under tons of dirt when the 17-foot-high, 135-foot-long sewer trench they were working in collapsed on them.

In August 1978, the federal Occupational Safety and Health Administration (OSHA) charged that the trench had not been properly braced to prevent a slide or cavein, and recommended that penalties of $24,300 be assessed against the companies.

The firms are contesting the assessment of the penalties. Bruce Jennings president of S. O. Jennings, said at the time of the accident that the cave-in was not the firm's responsibility and denied any wrongdoing.

According to federal figures, 18 workmen were killed in Washington area construction accidents between January 1978, and June 1979. OSHA has recently increased its inspections of Virginia construction sites.

The families of the two workers each received $1,000 for funeral expenses under Virginia's no-fault workman's compensation act, which is generally interpreted as barring damage suits against employers.

However, this week in Fairfax County Circuit Court DeGroot's mother, Julia A. DeGroot, filed a $1.6 million damage suit against Jennings Construction Corp., claiming it provided unsafe working conditions that led to the death of her son, according to her attorney, Marc E. Bettius.