The Boston Teachers Union overwhelmingly ratified a new contract Wednesday that will lead to changes in class sizes, teacher evaluations, and a new salary structure, the union president said. At their headquarters in Dorchester, union members voted 695 to 5 in favor of the pact reached last month with the School Department, said Richard Stutman, president of the teachers union. Teachers will receive a total of 12 percent in raises over the six years of the new contract. Matt Wilder, a spokesman for Boston public schools, said the School Committee will vote on the agreement Oct. 24.