If you absolutely MUST only use a single layer, AND your shapes are spaced out, you could use a gradient fill on the shape layer. With a bit of tinkering you should be able to achieve 1 layer and multiple colours.
However Photoshop is not designed to work this way.
If you don't know how to separate shapes into new layers it's easy: just select your shape with the Path Selector Tool (A) and use Cmd/Ctrl J to copy and paste to a new layer, or Cmd/Ctrl Shift J to cut and paste to a new layer. Then in your layers palette you can click the layer icon to change the fill colour.