The answer by tpg2114 does a good job of explaining why the loss of energy in the flow due to viscous effects should result in a reduction in lift. I would like to add a few comments about the effective modification of the airfoil shape due to the boundary layer (since the question specifically asked about that).
At sufficiently high Reynolds numbers, flows over airfoils can be computed (to engineering accuracy) using viscous/inviscid interaction techniques, rather than solving the full Navier-Stokes equations. These are based on the idea that the viscous effects are confined to a limited region near the airfoil surface (the boundary layer), with no pressure gradients normal to the surface, and with inviscid flow outside the region. Inviscid flow and boundary-layer calculations are performed in an iterative process, with the boundary between the viscous and inviscid regions determined by moving the points on the airfoil surface in the normal direction, by an amount equal to the computed displacement thickness of the boundary layer.
This procedure amounts to effectively modifying the airfoil geometry, the major effects being a thickening and a decambering of the foil section. At the risk of oversimplifying, the thickening causes an increase in the drag, while the decambering causes a reduction in lift. (An alternative procedure simply changes the normal-velocity boundary conditions at the airfoil surface, resulting in an approximately equivalent outward displacement of the computed streamlines.)
A good example of a viscous/inviscid calculation for a case with relatively thin boundary layers and no separation is shown in the figure below. This was taken from the book Analysis Of Turbulent Boundary Layers by Tuncer Cebeci and A.M.O. Smith. (I should probably disclose that Tuncer Cebeci was my direct supervisor for several years).
When the boundary layers are thin, it is somewhat difficult to visualize the decambering effects, but it becomes obvious in more extreme cases. Even when flow separation is present and the boundary layers are thicker, viscous/inviscid interaction can sometimes give a remarkably good approximation to the actual flow. This is illustrated in figure below, from the textbook Flight Vehicle Aerodynamics by Mark Drela, in which the red curve surrounding the airfoil represents the effective shape about which the flow was calculated.