It's all about context. If you're a teacher at an elementary school and volunteer at the church in your spare time, then no. It's not okay to swear with anything approaching regularity.
If you work in my office, no one will think less of you for not swearing, but you're %*(! sure not going to stand out for dropping the occasional F-bomb.
This goes double (to triple) if you work in the IT department, like me.
At the end of the day, they are words. Unfortunately, it matters more how others interpret those words than what you mean when you say them, but if you know your coworkers/friends are okay with it, go nuts.