If the shape is a “custom shape”, then it is possible, but there is no UI for it. If you save the file to flat file format (*.fodg), then you can read the file in an editor. If the graphic has a node “draw:enhanced-geometry”, then it is a “custom shape”. In that case you can add an attribute draw:text-rotate-angle=“30” for example to the draw:enhanced-geometry tag to rotate the text by 30 degree.
There exists some issues about text rotation for import of files from Microsoft Office, but I have not found an issue about the missing UI for text rotation.
If the shape is a Bézier curve, the text orientation follows the shape rotation. So if you want a 45deg text, then rotate the shape to 45deg. After done that, go into point edit mode of the curve and drag the single points to their desired places.
If you want to have text directly on the line of the Bézier curve, you need the tool “Fontwork” (Text along path) from the category “Format”. It is not included in the default menus and toolbars, you need to customize a menu or toolbar and add this option.