Social Norms, Bounded Rationality and Optimal Contracts