Constraining the range is relatively straightforward (although you might want to consider if you want all outputs in this range to be equally likely).
A simple way to do this is to add a sigmoid layer (which will constrain the range to be between (0, 1)) and then to scale that output so that it is between (0, 0.5).