Of-course you can. It would be really easy for you if you use a iPhone data recovery software. Upgrading an iPhone sometimes leads to loss our data. But believe me, one can get it back with the help of a backup recovery tool. The one that I had used in a similar situation was TotalSave. Here's the link to their product page http://goo.gl/WNUhkR
If you have already backed up your iPhone with iTunes, you can recover deleted contacts by the following steps using iTunes: Click the File menu and select Devices > Restore from Back up. Or Open the iOS device's Summary tab. There are two ways to access this: Click the device button in the upper right corner. (If viewing the iTunes Store, click the Library button in the upper right corner. The device button will then be visible.) From any view in iTunes, click the View menu and select Show Sidebar. Select your iOS device in iTunes under Devices. Click the Restore Backup button.
If haven't had time to back up your iPhone before the deletion, there are also two methods for you to retrieve deleted contacts of iPhone: 1. Recover the deleted contacts directly using a third party software; 2. Recover the deleted contacts under DFU mode. Read more: http://goo.gl/YckYG.