When we are in safe environments, for example with family and friends, we share our opinions without thinking too much about the consequences. This behaviour is a habit and our habits are difficult to be changed. Why should we change this habit? We are not always in safe environments.
I often say that transparency is great for the organisational culture. I’m not changing opinion on this; however, you need to be sure that you are using the right way to tackle an issue. You should not cover the truth. You just need to be careful about how you say things.
How to train yourself in changing this habit? You need to try with an exercise. A simple one? Count to 3 and then say what you think. The new habit will take time but it will surely help you to improve your approach and it will make you more comfortable in tackling issues, even difficult ones.