It's interesting to think about what is 'optimal' when discussing LLMs; considering that the cost is per-token. So assembly would be far from optimal as it is not exactly a succinct language... A lot of common operations are repetitive and require many operations; a more abstract, higher level language might actually be inherently more succinct.
It's not just that humans aren't good at thinking in assembly language or binary, but the operations are much more granular and so it requires a lot of operations to do express something as simple as a for-loop or a function call.
I think the perfect AI might actually come up with a language closer to Python or JavaScript.