Virginia Gov. John N. Dalton told a congressional hearing yesterday that giving the District of Columbia the right to place a tax on commuters would violate the spirit in which Congress passed home rule legislation for the city four years ago.

"Home rule wouldn't have passed without that exemption," Dalton told Rep. Ronald V. Dellums (D-Calif.), chairman of the House District Subcommittee on Fiscal Affairs, which is considering proposals by Dellums and Rep. Stewart B. McKinney (R-Conn.) that would remove that restriction.

"To come along now, after you got the votes (for home rules), and change it, well, I don't think that's right," Dalton said.

Dellums answered that the 1974 vote represented "the collective expression of Congress at that time only . . . We have a moral, political and intellectual obligation to try to improve" on past actions.

"If we take your way," Dellums told the governor, "we'd still be in Vietnam."

The exchange between Dalton and Dellums highlighted a morning of testimony in which all five suburban Washington House members repeated their opposition to any legislation that would allow their constitutents who work in the District of Columbia to be taxed by the city government.

Rep. Herbert E. Harris II (D-Va.), who is a member of the subcommittee, raised the specter of the loss of financing for the Metrorial system if a commuter tax were imposed.

Harris elicited from Dalton the prediction that there would be an adverse effect on Metro if the Virginia General Assembly were told that income tax revenues in that state had been cut by $39 million because that money, now sent to Richmond, had been sent to the District of Columbia instead.

Dalton argued that Northern Virginians who work in the District of Columbia "are paying their fare share in sales tax and parking tax" for city services.

McKinney, whose bill would tax nonresidents at one-third the applicable D.C. rate, contended that "commuters don't contribute to the economy in Washington" as they do in New York, for example. Federal workers often "park in subsidized garages or lots and eat in subsidized cafeterias," he said.

Dellums said the fight over whether there should be a commuter tax "should go on in the D.C. Council" and not in Congress. "I want to raise the discussion above polticial practicalities" and talk about the philosophical question of whether the city should have the right to levy its own taxes, as all 50 states do , Dellums added.

Dalton said that while the loss of revenue would be "very detrimental," he also is opposed to taxing nonresidents "on principle." He said Virginia imposes its income tax on nonresident workers from only two states, North Carolina and West Virginia, and then only because those states do not have reciprocal agreements under which Virginians who work in those states are not taxed by them.

Rep. Gladys N. Spellman (D-Md.) said she also opposed the proposal on principle. McKinney noted that Delaware residents who work in Maryland pay Maryland income tax, to which Spellman said "that's wrong."

"If I were in the legislature, I would vote against it," Spellman said. "And I'd be willing to go down there (to Annapolis) and tell them."

Spellman also said she could not "in good conscience" ask her constituents "to pay for champagne tastes in the District while their own budgets barely permit beer." She said that Harris had said that per capita costs of providing services in the District of Columbia "is almost twice as much as that in other cities of comparable size."

Also testifying in opposition were Reps. Marjorie S. Holt (R-Md.) and Joseph F. Fisher (D-Va.), Rep. Newton I. Steers (R-Md.) boycotted the hearing, but submitted a statement saying he was "strongly and unalterably opposed" to the proposals and "disappointed that hearings are being held at all."