The second sentence is correct = I'm not sure if we can do this. We use if, in this context, when expressing a feeling of uncertainty or lack of confidence on a particular matter.
The first sentence is not really correct. People do say this sometimes but it is not good English.
You can say, however, I am sure that we can do this.