Town meetings shall be held within the geographic limits of the town unless a special law, charter or by-law provides otherwise; provided, however, that any meeting for the election by ballot of federal, state or other officers or the determination of other matters that are to be determined by ballot at an election shall be held within the geographic limits of the town.