Talk to him calmly, and let him know the situation you were in. You may want to do it before he gets back home so he has time to calm down if he's upset. If you think he won't listen, write him a note instead. That way you can explain without being interrupted. Parents think kids are faking it, especially if they've stayed home before and didn't seem sick later in the day, but he knows you, and he'll know if you're sincere.
I'd say something like, "Dad - I'm sorry, but I really feel terrible. I feel like I have a fever and couldn't leave because I had to stay in the bathroom. I think I have the flu" That's about all you can do. Parents can tell if you're really sick or not if they take the time to consider the possibility instead of blowing up.
Show him your question here. You couldn't get on the bus and risk having an accident. No matter what happens, having an accident because of diarrhea would be worse than any punishment from your dad. It isn't right to make other people sick either. Parents that force their kids to go to school sick are spreading germs. If it was just a cold that's one thing. In the working world people still have to work when they have a cold, but what you described is a legitimate reason to stay home. No matter how it goes with your dad you made the right choice. Good luck and feel better soon.