No, it's not safe to exercise while in the shower. More importantly, the cost-benefit ratio is too high for this to be effective.
Let's consider the "supposed" benefits:
1. Burning calories: How much calories can you realistically burn? Your calorie burn is determined by your intensity and the duration. Your intensity will be low because you're careful not to hurt yourself. The duration will be low too because it's quite unlikely for you to spend more than 10 minutes squatting in the shower.
As a result, the actual calories burned will be low.
2. Multi-tasking ( in order to burn calories while performing other tasks): Multi-tasking is awesome in the right environment and context. Squatting while showering isn't a good combination for multi-tasking since both actions require some form of concentration to function properly; otherwise, there'll be no benefit for either action (you won't be effectively clean and your exercise form will suffer). You're better off performing your exercises and then showering.
And now for the costs:
1. You can (and very likely) will hurt yourself. Jumping or squatting on a slippery ground is a bad idea. Not only can you slip, but the motion can cause temporary disorientation that'll result in you falling. Hitting your head or vital parts of your body against the bathroom's hard surfaces is much more likely to occur.
2. A lot of bath areas are too small to accommodate effective exercises. Exercises that really burn calories (running, plyometrics) just can't be performed in small, contained location.
3. Some exercises just aren't feasible in the shower. Performing push ups in the shower (in pools of water) is both disgusting and unhealthy.
4. Sweating while showering makes little sense. If your goal of showering is to clean yourself, but you manage to generate enough intensity to create a sweat, what's the purpose of the shower?
5. You can injure yourself. This is worth repeating. If you exercise in the shower, you'll hurt yourself sooner or later (it's not a matter of "if", it's a matter of "when").
The benefit you'll gain is minute, compared to the potential cost. You're better off exercising before showering.
Optimal solution is this: create dedicated periods to exercise, eat right, have quality sleep, and incorporate exercising/movements in your daily life and you'll have no need for injury-prone disasters such as exercising while showering.