I consider myself a generalist, and have really enjoyed working across several domains (primarily design and programming) - it is quite possible to pursue a profitable career while not fitting entirely into the boxes that bosses and hr would like you to fit into. We've just launched a startup over at www.coolplaces.co.uk for which I did the design and programming, but I am not a reliable judge on whether it is excellent or not :) FYI I started in fine art, and have worked for a living in design and programming.
There are many advantages to being familiar with both programming and design, and many similarities between the disciplines at a deep level (thinking through a problem holistically, balancing constraints, incorporating and developing ideas from clients). I think those advantages more than pay for any disadvantages which come with not being a specialist in one subject. In fact knowing something about several disciplines will often help inform your work in both and allow you to bring ideas form one to another - that's why many education systems require students to pursue a broad coarse of studies alongside their more narrowly focussed specialism even in higher education.
As an example of cross-fertilisation helped by working on both, for design I use version control to store my work, which is a practice imported from programming which I think many designers would love to have. For most designers, the equivalent is to keep 50 files in a folder marked design-1, design-2, etc. There are also collaborative systems like ticketing systems broadly used in programming which apply very well to managing client expectations and letting clients track your work and prioritise certain bits of it.
Looking at present day startups, I think you could say that a startup like 37signals qualifies as having many generalists - whether you classify them as excellent or not is up to you, but they are certainly successful. For more examples, look at the banner on this website http://designerfund.com/ - I'm sure many of those companies contain many excellent generalists that you could take inspiration from.
Looking back to the past for examples, there are many many examples of polymaths who have excelled in several disciplines, like Leonardo da Vinci, who was both an excellent engineer (often overlooked), inventor, and hugely creative and influential in the art world (which he is of course famous for). Which I'd say is definitive proof that your boss's conclusion is wrong in general. It is still possible your boss is right about you and your future direction, it seems unlikely if you are passionate about both areas that you can't grow in both, however it is possible that you are far more suited to one than the other and would benefit from specialising. Without seeing your work, I don't think anyone here could say.
Personally, I would simply take note of what your ex-boss has said, and continue to do whatever interests you, and work in areas which you feel competent in, and enjoy. If you find that throughout your career, lots of people are advising you to choose one path over another, it should lead you to either try to improve your skills in the area they highlighted as less than stellar, or move toward specialisation if you don't feel any desire to improve in that area. If your clients continue to be happy with your work in both fields, why would you feel the need to specialise?
I don't think you can extrapolate from this particular bit of advice to you a general statement about the possibility of impossibility of generalism, and I think given the evidence from the past, the present, and other posts on this board, the answer to your central question above:
Is it possible to become 'excellent' at both design and coding
Is a definite YES. Whether you will or not is up to you.