Public school, doubt they can do much unless it was directed at someone and somehow constitutes harassment, etc.Private school...well, if this is a religious affiliated school they might take it more seriously. Otherwise, it seems excessive, but perhaps the school has a thing against swearing in class.
I had professors cuss in class a little strange the professor took it up to the Dean. Perhaps it was a student that said something, which is why the Dean is involved, but odds are once he/she hears all you said was bulls**t in class they will say it is unprofessional to use profanity in class you need to use your words carefully as a lawyer, etc .In the real world people cuss all the time it is not good, but it happens. I am sure you will be fine bulls**t is not even that bad of word, basically you should be fine if you just apologize and say it won't happen again.