I find that when I'm working on research in the office, at least with the door open, I often get interrupted and am generally less productive. On the other hand, I often have students ask to meet with me outside of office hours on days when I don't plan to be in my office, and they're unhappy when I mention that I won't be available that day. I suspect this hurts my student evaluation scores (which are the primary basis for the evaluation of our teaching in our tenure process).
Additionally, as junior faculty, I'm aware that getting tenure is partly about "fitting in" with your department. In mine, many (most?) folks are in their offices for something closer to 9-5 five days a week, perhaps leaving early on Friday. When I am in the office, I make a point to stop in and say hi to colleagues, but I'm sure that I'm less visible around the department than many others.
So rather than a specific answer, I guess I'm looking for guidelines in how you approach this type of decision.
I find that when I'm working on research in the office, at least with the door open, I often get interrupted and am generally less productive.
You need to redefine productive. Having your door open will increase the time it takes to get a manuscript out, but that is not the only thing that defines productivity. Time spent improving your teaching evals (e.g., by meeting with students) and being visible to your colleagues IS time well spent.