Yeah, you can hold a shield in one hand and cast with the other, no problem. Except for, as themind mentions, a shield's spell failure chance. With a light shield or buckler, that's 5%, for a +1 bonus to AC. You'd have to decide if the tradeoff was worth it. If you came across a neat magic...