Here is my solution.
For instance you want to come up with the following shape:
Let's create rectangle:
Now duplicate the layer by pressing Cmd + D:
Press Rotate button on upper toolbox, you will notice small cross in the center of the shape:
Move that cross exactly to lower right corner of the shape, you can zoom in for precise position:
Rotate that shape by your mouse for 90+45=135 degree:
You have two identical shapes with 45 degree between them.
To make sure that shapes are properly aligned you can select the first one, press Edit on toolbox, select lower right circle and check it's position:
Select the second shape, enabel Edit mode, select lower left circle and you will see the same position as the previous one:
If you want this shapes to be horizontally aligned, group them by selecting shapes and pressing Cmd + G, then enter 45/2=22.5 degree in the Transform field:
If you want align by sides of the shapes, here is the instruction:
Create first shape, in my case: rectangle 100px by 100px at x=0 and y=0 coordinates.
Then duplicate layer and move it exactly the same pixels as the width of the shape, 100px in my case:
After group these shapes, select the group and and enter 45 degrees ant Rotate field in Inspector view:
As you can see there is no gap between the shapes even at maximum zoom: