there is a plug for the tail light underneath the seat and gas tank, i would start by checking it for chaffing and corrosion!
i dont think the power for the TAIL light runs through the brake light switch, if i remember right the brake switch makes a ground contact, instead of a power contact in order to operate the brake light!