Any basic knot will do--whatever will hold for you is fine. Another solution would be to change colors at the beginning of a row, rather than in the middle. Then you can just leave long tails of both the old and new colors, and worry about sewing those in once the scarf is done.
Good luck! Chime in again if this doesn't help.