“I was wondering if you can do time or weekends in jail instead of paying a fine for a traffic ticket that might already be a warrant?”

That is entirely up to the judge. Of course, if there is a warrant out for your arrest, you are looking at the possibility of doing time anyways, and there is no guarantee that you won’t also have to pay a fine.