I am a holder of a Swaziland passport. I have a six months UK visa expiring 22 December 2016. I have travelled on it in July this year.
Can I travel to UK a week before my visa expires?
Yes. The period of validity is the period over which it may be presented at the border to request entry. It is a multiple entry visa so can be used more than once. It is limited to a stay or stays totalling 6 months so you second visit plus your first cannot exceed that within 12 months.
There is quite a good synopsis at Breytenbachs:
Rules of the Multiple Entry Visitor Visas to the UK
The visitor visas allow one to travel to the United Kingdom for 6 months out of 12 months. One is only allowed to spend a maximum of 6 months out of 12 months in the UK. Once 6 months in the UK have passed, you will need to leave the UK for 6 months.
The permit holder does not need to return to his/her home country, and are allowed to travel to any other country as long as they are outside the UK.
The visitor visa is multiple entry, which means one do not need to travel and stay for the full 6 months in the UK. For example one can travel for 2 months to the UK and leave for 2 months, travel again for 2 months and leave for 2 month etc., as long as the permit holder does not stay in the UK for more than 6 months per 12 months.