In short, yes you can. But it's not as simple as performing an upgrade. You need to install Logic as a standalone app, but the main point is that your Garageband projects can be opened in logic and then you can use all the more professional aspects of the logic pro software. Garageband is often described as a musical notepad and so there are some real benefits to upgrading, for example if you wanted to advance a demo to a properly releasable track.
There are 2 steps to upgrading:
1. Purchase and install logic pro
2. open and save your Garageband projects in logic
3. uninstall Garageband (though we recommend you keep it as it's a great way to quickly get ideas recorded)