You can, but you had better not do that. Pink eye is a common acute epidemic conjunctivitis which is caused by bacteria infection and it is characterized by acute attack and powerful infectivity. Its main route of transmission is through touch. Once a healthy person touches the things stained with the eye secretion or tears of the one with pink eyes, such as towel, handkerchief, washbasin, water, etc. or he shakes hands with the one with pink eyes and then rub his eyes with his hands, then he can be infected with pink eyes. So I advise you not to go to the gym, because the gym is crowded with people and you will sweat after doing exercises, thus you need to rub your sweat with a towel. Furthermore, it is likely that you meet your friends there, once you shake hands with them unconsciously, they can be infected.