I think a combo solution is good for starters. Get a decent inexpensive rack. Add on a grocery pannier (a collapsible, usually open topped, fabric basket - see
http://www.calhouncycle.com/productc...?idCategory=93 for a number of examples). You can throw the backpack into the basket while you ride and carry it with you after you lock the bike. You can also expand your carrying capacity by wearing the backpack and putting other items into the basket.
Whether you use this solution or just a backpack, it
might be worth it to think about picking a backpack that is optimized for bike use -- e.g.,
http://www.banjobrothers.com/products/cycling-backpacks/