Shockwave ( generic Cybertronian ) :
I’ve always had a headcanon that Cybertronians don’t just see out of their optics, but have sensors all around their bodies. You often see when they’re in vehicle mode (especially in TFP) that they can see what is behind them in their side or rear view mirrors. While I don’t consider them optics per se (or at least their main set of optics), they are definitely sensors that can tell something is there.
For Shockwave, particularly in TFA, he has more optic sensors than others, considering while Longarm, he has his usual two (blue) optics, but when he’s Shockwave, those optics disappear entirely and it’s a single optic. I headcanon that this is his MAIN sense of vision. His regular and set programming would be his single optic (and no, just because he only has one doesn’t mean he suffers depth perception issues--he’s not a human, he doesn’t need two eyes to see). He may even be at an advantage with a single optic vs having to have programming for two.
Longarm is someone who came SECOND, who came AFTER Shockwave, so those were something he could have even had added on as an upgrade to suit his personality, especially considering his single, red optic is still there when he’s Longarm.
The idea that when he transformers back to Shockwave and those two blue optics just... disappear makes me giggle a little, but they could have their uses for something else entirely.
But overall, I’ve always figured that their bodies in general have multiple ways of sensing something is there--take into consideration cars these days that have sensors that flash when someone is in your blind spot. Even something akin to that, or a reverse camera, etc. While they certainly have their MAIN optics (which are generally in their face), I still headcanon they have sensors all around their bodies, which could of course vary from ‘bot to ‘bot.