Reconciling scaling of the optical conductivity of cuprate superconductors with Planckian resistivity and specific heat