Ugly borders in OS X
No you can't, that's the space that indicates that the dock is on that side. BUT, what you can do is move the dock to the left or right if really bothers you that much. You are limited to space from top to bottom, but not left to right, so you can override that little space on the sides but not at the bottom. :)

If you don't like it in the sides, you can move it to the sides, resize your window to 100% height, then move the dock back to bottom. You will see the space is gone.

Alternative: Go fullscreen mode cntrl+cmd+F