Hello Happy668,
This is a topic that has been around for as long as I can remember and have played this game. Simple answer is this: YOU fired the torpedoes, YOU are responsible for the end result. Let us expound on that a little bit because there is more to it than just "fire and forget about them". When you are playing a ship that has torpedoes there will always be the risk of hitting an ally ship, even if you didn't fire them anywhere close to an ally ship. This can be done in low tier, high tiers, or any tiers in between. Now, we have all made the mistake of hitting allied ships with friendly fire. The key is learning from the mistake and trying not to do it again (not always possible but can be preventable). Let us list off some "tips to live by" when it comes to torpedoes.
Tips:
Learn the effective ranges of your torpedoes, just because they can go 20km doesn't mean they are effective at that range.
Make sure you know which torpedoes you have equipped, the range, the detection range of the torpedoes and spread type that they can be launched in.
Before you launch the torpedoes, check that the area you want to launch them towards is clear of ally ships. More times than I can count I have been hit by friendly torpedoes from the "flanking" DD.
Do NOT fire torpedoes from behind allied ships, this not only has a chance to hit allied ships but constrains their movements.
If for some reason you do launch torpedoes from the second or third line, make sure you warn your teammates that you are.
As long as you follow these basic steps your hits on allied ships will go down to almost zero. You have to be conscious of allied ships and where they are, you cannot predict their movement. Allied ships should not have to deal with enemy torpedoes and allied torpedoes (fired haphazardly) at the same time.
Good luck Captain!