While most people are in fact giving you the right answer (it was your fault, there was no need to engage "fire mode" before double-checking your target was wanted, it was NOT a him or me situation - it was bad judgement) there are ways to do what you want, you will find that if it was indeed "just a few stray shots", you won't actually get penalised in any meaningful way for this. Just pay your fine and watch out for these things, they happen.
1) Run a few missions for the controlling faction; get a few faction rep under your belt and system authority from that faction show as friendly.
2) Learn to use "Target Next" and not "Target Front" in situations where this could happen. Yes it is up to you to judge this situation. (there are default bindings for this on all controllers, and using "target next ship" while under supercruise does not change your destination target - enjoy the free scan-mats)
3) There are engineered mods for certain guns that have a FoF component, so in a way what you are asking for exists - but you have to work to enable it.
There are down-sides to using FoF ammo, like the fact that sometimes a mission (or a galaxy play) may require you to whack a friendly target - always have something that can turn them hostile too. Another note is although turrets may seem like the "ultimate" beginner weapon, their (much) lower damage than fixed or gimballed can make them very inefficient. Honestly (IMHO) a mix of gimballed + fixed is a much much better start. Not only do targets die faster, but once you learn to track the AI's flimsy attempts to flee from your super penetrator rails (
), you will soon learn why most long term players laugh when you tell them you have turrets.