RSTP uses the link speed or path cost to weigh the edges (generally, 10 Tbit/s divided by the link speed). However, it does not automatically place the root bridge - that is up the configuration by the network designer.
So, no - the spanning tree is not necessarily minimum (having the least possible weight sum) although the algorithm leans that way.
A minimum tree may not even be desirable in all scenarios, depending on your traffic flows. You select your root bridge accordingly and can even change each port's priority to force the tree to become less minimal.