The simple answer to this question is NO; search engine optimization is not spam.
Here is a great video from Matt Cutts talking about search engine optimization and how it can be helpful for search engines and website owners.
The long answer is that if done improperly search engine optimization can become spam. There are many industry standards and acceptable practices that should be used to make sure your website is optimized for search engines but there are also many companies who are either inexperienced or negligent in performing optimization and use techniques that are designed to trick or unfairly manipulate search engine results.
In the SEO industry the terms white hat and black hat are often used to differentiate a good search engine optimization company with sound methodologies from the others.
Generally the term white hat refers to SEO specialists that perform keyword research, technical analysis, copy-writing, a/b testing and conversion analysis to improve your overall traffic and website conversions. Companies that use white hat methods are much more successful over the long term.
The term black hat is often a negative reference to point out SEO techniques generally frowned upon by search engines and many respected SEO specialists in the industry. Quite often techniques may include keyword stuffing; hidden text, unnatural link building and any other activity which may unfairly manipulate the search engines results pages.
From a website owner point of view it is important that you understand the difference. An inexperienced or unethical SEO company can do a lot of damage to your website rankings which can be difficult to recover from.
There is no question that good SEO brings a lot of value to a website so it is important that you look for a reputable company to perform these tasks for you. When you are looking for a company make sure they can show you some long term clients with long term results. Make sure they can give you references and show you examples of their work. If they start off saying we will add some keywords in your meta-tags and provide links from tons of blog sites this is a clue you may be talking to a black hat or very inexperienced optimizer. If the SEO company is talking about basic SEO, keyword research, copy-writing, website structure and conversion analysis then you are likely working with a white hat that has some experience. It is good to know the difference.