You might want to look into creating a benefit corporation, which is essentially a for-profit entity with goals beyond maximizing shareholder value:
http://benefitcorp.net/faq
In terms of making sure the company stays true to your purpose, that's what board seats and voting shares are for. Beyond that part of entrepreneurship, and working with others in general, is accepting that we won't always get what we want. You might have to accept that your company at some point focuses more on profit than you'd prefer.