We consider the heat equation in a polygonal domain Omega of the plane in weighted L-p-Sobolev spaces partial derivative(t)u - Delta u = h, in Omega x (-pi, pi), u = 0, on partial derivative Omega x [-pi, pi], u(., -pi) = u(., pi), in Omega. Here h belongs to L-p (-pi, pi; L-mu(p)(Omega)), where L-mu(p)(Omega) = {v is an element of L-loc(p)(Omega) : r(mu)v is an element of L-p(Omega)}, with a real parameter mu and r(x) the distance from x to the set of corners of Omega. We give sufficient conditions on mu, p, and Omega that guarantee that problem (0.1) has a unique solution u is an element of L-p(-pi, pi; L-mu(p)(Omega)) that admits a decomposition into a regular part in weighted L-p-Sobolev spaces and an explicit singular part. The classical Fourier transform techniques do not allow one to handle such a general case. Hence we use the theory of sums of operators.