The House voted 305 to 112 for a bill altering the 48-year-old Hatch Act, which prohibits most federal workers from engaging in partisan political activities such as running for office or raising money for other candidates. The bill, opposed by the Reagan Administration and the Chamber of Commerce, among others, now goes to the Senate. Proponents said the changes would give basic rights of political expression and involvement to civilian federal workers. They said the bill increases protection against intimidation for federal workers not wishing to get involved in politics. But Rep. Frank R. Wolf (R-Va.), whose northern Virginia district is home to thousands of federal workers, urged that the measure be defeated. "(Federal workers) would be forced to make political contributions when they don't want to," Wolf said.