I doubt it. The last version of XCode 6 won't run without Yosemite, so I'm guessing 7 will require Yosemite.
Also it's very hard to run with 2gb ram. For example you won't be able to use the iOS emulator because the swapping will take so long XCode will timeout when trying to launch the emulator. It's very painful even with 4gb. 8 is probably the minimum.
You say you can't upgrade the computer, but surely you could throw some extra memory in. You could increase it to 8GB for around US$60 and benefit from a substantial improvement in performance across the board.
Also it's very hard to run with 2gb ram. For example you won't be able to use the iOS emulator because the swapping will take so long XCode will timeout when trying to launch the emulator. It's very painful even with 4gb. 8 is probably the minimum.