Yes you can, you can share the same key between them both (ssh key) or create a new one per git server.
Create a SSH config file
When you have multiple identity files(in your case one for gitlab and one for github) , create a SSH config file to store your various identities.
The format for the alias entries use in this example is:
Host alias
HostName github.com
IdentityFile ~/.ssh/identity
To create a config file for two identities (workid and personalid), you would do the following:
Open a terminal window.
Edit the ~/.ssh/config file.
If you don't have a config file, create one.
Add an alias for each identity combination for example:
Host github
HostName github.com
IdentityFile ~/.ssh/github
Host gitlab
HostName gitlab.com
IdentityFile ~/.ssh/gitlab
This way you can have as many accounts as you wish each one with a different ssh key attached to it.