在Python的turtle库中,要修改画笔颜色,应该使用turtle.pencolor()函数。因此,选项D中的语句turtle.pencolor('green')可以实现只修改画笔颜色为绿色。其他选项的功能与画笔颜色无关。