Depends. I did a STEM degree in a London uni and in first year I did 3 optional modules, 2 of them had to be maths which sort of defeated the point of them being called optional but the third one had a slightly larger range of options and I was able to pick a language module. However, from second year onwards all of the possible optional modules were directly related to my degree and I could no longer do anything like a language. I suspect this is the case for most degrees so it may be possible in first year but unlikely for the others.