2 Samuel 11:1, Matthew 1:6 and 1 John 3:1

God Forgave David, of course He can forgive you.