Is it safe to fly a glider when I can't move the stick fully left and right?
Yes, it is safe.

Well, there is a reason why the stick travels as far as it does. One is the restriction in long-term maximum stick forces of 15 N (see §22.143(b) in the linked PDF), which is easier to fulfil if the stick has more travel. The other is the required roll speed to switch from +45° roll angle to -45° roll angle within 5 seconds for a glider with 15m wing span (see §22.147), which is easier to fulfil if the ailerons have a wider deflection range.

I found myself in the same position on several occasions (after all, I am 6' 6" tall when standing upright - most gliders became only flyable for me after I had fitted a new instrument panel, the 2-33 being a notable exception) and for me it was enough to be able to yank the stick fully to one side when I had lifted my leg off the pedal on that side, so the stick would fit below my knee.

If you want to fly a coordinated turn, the knee on the side where the stick should go will be stretched, in order to push the rudder to full deflection, so then the stick should be able to travel where the knee had been with a centred rudder. This will be the normal case - isolated full aileron without rudder should be the exception.

If you are concerned about unusual attitudes: You will not fly aerobatics, will you? And in order to end a spin, rudder is far more important than aileron, which should be kept centred in a spin.