BCS theory on a flat band lattice