Hi,
you can create an square mesh and then rotate it 45 degrees. Something like this:
mesh = RectangleMesh(Point(0.0, 0.0), Point(1.0, 1.0), 10, 10)
mesh.rotate(45, 2, Point(0.5, 0.5))
plot(mesh, interactive=True)
See the mesh documentation for more information.