Sometimes it's better if you use tiles that are bigger, say 48x48, with your 32x32 tile sprite in the middle. This is more of a burdon on performance, but as a lot of the extra 16 pixels will be transparent, it might depend on what your programming in.
With 48x48 sprites, you would still use a 32x32 grid, just decrease the position by 8, giving a an 8 pixel border around the tile. It would support the 40x40 sprites then, if you really need 54x54, then you'd have to go to 64x64 sprites really.
With bigger sprites than the grid, you can do better tile transitions, have tiles with edges that overlap, have foliage for example on a grass platform.
It can be really tricky to work with sprite sheets, I suggest picking a standard and sticking to it - even if it means you can't use some of the tiles you already have.

I am the one who knocks...
