Public workers do not enjoy exemptions that do not exist for private workers. If a private worker publicly bashes the company that employs him, then most would expect he would be fired. Similarly public workers should be held to a similar standard.
There are cases of whistle blowing that should protect those that are trying to protect the rest of us, but that is a special case. Saying racist or slanderous things about ones employer should be a fireable offense.
I believe the speech of public workers can be limited. I believe society is limited in many ways by their employer. Companies want faithful employees that are available all hours of the day and night. They want their employees to represent them while they are at work and outside of work. Employers monitor things like Facebook posts and social activities. Of course public workers are limited.
Public workers in some areas can't protest and can't work for a political office if they are already on government rolls. As such, free speech of public workers can be limited because they have a conflict of interests. If a public worker openly supports one candidate over another, that could affect the person's job in the future should that official be elected.
Yes, the speech of public workers can and should be limited to protect the safety and knowledge they have. Some public workers have knowledge of events and plans that have not occurred yet. Some public servants have knowledge of matters that could effect the security and safety of individuals. Public workers who have foreknowledge of events that may effect a company are not permitted to purchase or sell stocks in that company. In the same way, the speech of a public worker must sometimes be restricted to protect others.