I got a solution with:

>! 42 cells as hallways.

And I think that it is optimal, but I have no proof of that yet.

Here it is:

>! [![enter image description here][1]][1]


  [1]: https://i.sstatic.net/4bu93.png