A low-pass filter is one way to do it. Due to the interpolation done in the repeat block, you are representing a symbol with 1000 samples, and your sample rate is 2 million samples per second (the samp_rate
variable). So your square wave has a frequency of:
$$ \require{cancel}
{2000000\ \cancel{\text{samples}} \over \text{second}}
{1\ \text{symbol} \over 1000\ \cancel{\text{samples}}}
= {2000\ \text{symbols} \over \text{second}} $$
Or more simply, 2 kHz. Square waves have odd harmonics, so the first harmonic you need to worry about is $2\:\mathrm{kHz} \times 3 = 6\:\mathrm{kHz}$. So you want a filter with a cutoff a little above 2 kHz with a transition width of a little less than 4 kHz, so he harmonic at 6 kHz gets attenuated.
But this isn't a great way to do it. Consider transmitting a single '1' symbol, surrounded by infinite '0' symbols. Assuming 1 is represented by "full amplitude", and 0 by "zero amplitude", then the result is some kind of pulse. Due to the filtering, this pulse will happen gradually, with the transmitter amplitude rising gradually to a maximum, then gradually going back to zero, maybe with some ringing, and maybe with some time held at maximum.
But what exactly is this pulse shape? If we want to build the best receiver, we need to know. Also, will the pulse for one symbol interfere with the pulses for adjacent symbols? Hopefully not, if we want the best performance. The low-pass filter approach isn't especially amenable to addressing these concerns.
So, the canonical solution to this problem is a pulse shaping filter. In GNU Radio you'll probably implement this with the Interpolating FIR Filter block, and calculating the taps for that block with RRC Filter Taps. The PSK tutorial or the BPSK tutorials give some examples in context. Unfortunately there isn't and ASK tutorial, but consider that BPSK and ASK are nearly the same thing: in ASK the amplitude is either 0 or 1, whereas in BPSK the amplitude is -1 or 1. Otherwise they are essentially the same thing.