What you describe "badly optimized" just means the game doesn't use the cpu, video card, and/or memory as well as it should.
"game optimization" is basically making the game run faster and/or better. Some game makers release 'patches' that fix the game aka game optimizations. Sometimes it can mean simplified graphics (less details) to make a game run faster.