You can't make most 45 degree rotations be on the grid.
Let's assume a 64 unit x 64 unit square (we're only considering top down view). The diagonal of that square is 90.509... units ( Sqrt(64^2+64^2) ), and thus will not be on the grid when you turn it 45 degrees.
If you want to be on the grid with your rotation, you basically need to sacrifice perfection and actually scale your cube up or down as you rotate so as to get the corners on the grid, which is essentially what you are doing when you build a 45 degree cube by hand on the grid at a 45 degree angle.
Here's an example from some rotated cubes. I built these on the 8 unit grid, rotated the texture 45 degrees and used Radiant's fit tool to get the precise texture scale. Notice how the top one is slightly bigger than 1x1 scale, and the lower is slightly less. That means this cube itself is slightly bigger or smaller than the normal 64x64 cube next to it... but it's close and most wouldn't notice the difference. A perfectly rotated cube would be a 1x1 texture scale (or close due to slight rounding), but would not be on the grid.
---
As a side note, if you want to know how to scale the texture without the fit tool: The rotated cube on top is 96x96 on it's diagonals, we need half that to figure the length of one side (we're making a right triangle): Sqrt(48^2+48^2) is 67.882... We divide that by the size of our texture, 64, and get 1.06066..., just like the fit tool gave us!