As you say, the most sought after materials are the rarest. You also correctly assume that the rarest materials are often those with the greatest molecular mass. This is because it takes a much, much bigger star to produce heavier elements. For example, say in a sector of the universe you have 100 stars, of which:
80 are average sized (produce elements up to iron)
10 are dwarves (almost useless in terms of element production)
7 are massive (all elements up to lanthanum)
3 are supermassive (all elements)
All of these stars will produce helium. Not very sought after, you'll have incalculable amounts of it.
90% will produce [up to] iron. Again, not very valuable in terms of rarity.
Just 10% will produce [up to] lanthanum. You're getting more valuable now.
Lastly, only 3% will produce anything after that. These are the most valuable elements. 2
Therefore (in theory), in such a sector, most elements after lanthanum would be the most valued. However, in practice this would be a bit different. Let's have a look at Earth, where uranium is more common than gold, yet it's heavier so by the above definitions should be more rare. This is because the elements produced by stars in the early stages of the universe were scattered around and as such when the earth formed, it had a bit of an odd distribution of elements, and still does.
You're right in that things like gold would be more common in space (it's rare on Earth because the Sun doesn't produce it, for the most part). So, in theory, the most valuable elements would be the heaviest. To be on the safe side, say the most valued would be after actinium, and obviously I can't say exactly which element would be most rare because of the slightly random distribution. However, if you base off these theories, you should be reasonably sure of it.
However, you will also need to note that value depends not just on rarity and supply of an element, but also on demand (thanks to Philipp for bringing this up). If, for example, uranium and einsteinium are both very rare, but there is a higher demand for einsteinium, then it will be the more valuable of the two because suppliers will recognise the market and push prices up.
As an added bonus from the comments: these will be the rarest elements, but how do we get them? As HDE says, taking a trip over to the nearest stellar remnant wouldn't be the most fun of adventures, nor would heading for a black hole to collect the remnants of a supergiant gone supernova. Fortunately, there is a solution.
It lies in the way new stars and systems are created. When a star dies, it leaves behind a dwarf, neutron star, or black hole. Either of the first two are, over (very very very very long periods of) time, broken up1 and they form nebulae, the interstellar clouds from which new systems are created. The elements that end up in each planet of the system come from this cloud. So, if you visit the nebula of a past supergiant that didn't go supernova, you'll find all those lovely rare elements there. Black holes, however, may become an occupational hazard.
1: Physicists, don't batter me: I only have very limited knowledge of this process.
2: Stars will only produce elements heavier than iron at the end of their life, releasing them on supernova because they are made in the core.